I would like to know if there is an option to pass the value from a file to one of the Jenkins parameters. For eg : I have a property file called config.properties and I would like to pass the value of a field called projectName to a Jenkins parameter called Project. How can I do this ?
Asked
Active
Viewed 1.7k times
2 Answers
2
Use Extended Choice Parameter Plugin - it allows you to define a property file and and a key within the file to use. The plugin expects comma-separated values to allow the user to choose one but if there's only one value - it will be chosen by default.

antweiss
- 2,789
- 1
- 13
- 12
2
- Add the Plugin Extended choice Parameter as stated by antweisis
- Need a Property files which means the file with the content in following format Eg: dates=21012,2013,2014,2015
- I have added the Image with how I have Configured the jobs as shown in the image bellow.
- To dynamically add the content to a property file create a script and run it as cron job or run the job that will populate the file first.
Where,
Delimiter = comma as we have comma separated the values
Propertyfile = path to the files
Propertykey = the key we have used for our example we have used dates
This will successfully create a drop down from the content of the files.

Tara Prasad Gurung
- 3,422
- 6
- 38
- 76