How can I use the Jenkins dynamic plugin in Jenkinsfile
?
I am looking for a Jenkinsfile fragment that:
- Enables the
Build with Parameters
in the Jenkins job - If selected, a script is populated that populates the list that
Dynamic Choice Parameters
can use, and the user will see a drop-down list.
Upon attempt:
Pipeline syntax
in Jenkins editor- Choosing
properties: Set job properties
as Sample step
- Choosing
This project is parameterized
- Using
Dynamic Choice Parameter
- Enter values ββfor
Name
, Choice Script
, Remote Script
, etc. Generate Pipeline Script
I get the following pattern:
properties([ parameters([ <object of type com.seitenbau.jenkins.plugins.dynamicparameter.ChoiceParameterDefinition> ]), pipelineTriggers([]) ])
i.e. the generated script pipeline does not contain the data that I entered in step 5.
above. How to change parameters
so that parameter name, selection, etc. Were visible to the user?
Jenkins version: 2.19.3 Dynamic parameter version: 0.2.0
source share