I have work with jenkins with setting several parameters, and I have a JSON file in the workspace that needs to be updated with the parameters that I pass through jenkins.
Example:
I have the following parameters that I will enter from the user who runs the task:
- Wednesday (think user selects "ENV2")
- File name (if the user saves the default value)
I have a json file in my workspace under run / job.json with the following contents:
{ environment: "ENV1", filename: "abc.txt" }
Now, no matter what value is set by the user before starting the job, you need to replace it in job.json.
Therefore, when the user starts the job, the job.json file should be:
{ environment: "ENV2", filename: "abc.txt" }
Notice the json environment value that needs to be updated.
I tried the https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin plugin. But I can not find help in parameterizing the values.
Please offer to configure this plugin or to offer any other plugin that may serve my purpose.
source share