I am using Jenkins readYaml to read the data as follows:
data = readYaml file: "test.yml"
//modify
data.info = "b"
I want to write this modified data back to test.yml in Jenkins. How can this be achieved?
I am using Jenkins readYaml to read the data as follows:
data = readYaml file: "test.yml"
//modify
data.info = "b"
I want to write this modified data back to test.yml in Jenkins. How can this be achieved?
There is a writeYaml nowadays, see pipeline-utility-steps-plugin
mydata = readYaml file: "test.yml"
// modify
mydata.info = "b"
writeYaml file: 'newtest.yaml', data: mydata