Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jenkins extended choice parameter plugin multi select values from a property file

How do you define the property file to use those values to populate the multi select parameter type of Extended Choice Parameter plugin in Jenkins ?

The plugin is in Jenkins version : 0.34.

I tried to configure a multi select based on a property file, but I can't get the plugin to read my property file correctly.

The file is found.

If I put one line in the file, I get an error from the plugin saying it needs two lines at least.

I tried the example with the countries (provided by the help button of the plugin) but it did not work.

Country City
United States San Francisco
United States Chicago
Mexico Mexico City
Mexico Cancun

I tried with a property file :

a b
c d

It didn't work either.

What did I miss?

Can it be an encoding problem ?

I used vi to create the file, is the tabulation ok?

I couldn't find an answer in these threads :

Populate 'Multi Select' parameter ('Extended Choice Parameter' plugin) in Jenkins dynamically

Extended Choice Parameter plugin Multi-Level Select

like image 762
Jacques Emmanuel Avatar asked Aug 28 '14 12:08

Jacques Emmanuel


People also ask

How do I add extended choice parameters in Jenkins?

If your Jenkins server is 10.10. 10.10 on port 12345 the URL is 10.10. 10.10:12345/pipeline-syntax Then, On the Sample step dropdown select 'Properties: Set job properties'. There is a checkbox for 'This project is parameterized', then you can select Add parameter > Extended Choice Parameter.

How does Jenkins pipeline pass Choice parameters?

Go to Jenkins Home, select New Item, add a name for your Job, for the project type, select Pipeline project and click on Ok. On the configure job page select the This project is parameterized checkbox in the general tab. Now, we will add an Active Choices Parameter which renders our Application Tiers as a Dropdown.

What is Active Choice parameter in Jenkins?

The Active Choices plugin is used in parametrized freestyle Jenkins jobs to create scripted, dynamic and interactive job parameters. Active Choices parameters can be dynamically updated and can be rendered as combo-boxes, check-boxes, radio-buttons or rich HTML UI widgets.


1 Answers

For multi-level select lists, you have to enter the column headers (Country,City) in the Value field.

enter image description here

like image 166
lkisac Avatar answered Nov 03 '22 20:11

lkisac