Based on this answer, I would like to iterate over all the properties in jenkins job and replace with their value in the job in build step.
e..g.
file = new File("folder/path/myfile.cs")
fileText = file.text;
fileText = fileText.replaceAll("parameter", "parametervalue");
file.write(fileText);
I saw an example to resolve one param like this:
build.buildVariableResolver.resolve("myparameter")
But I need
- To iterate over all of them
- To do it in Build step (after pulling from Source Code) so in the current build.
How can I do it?