How can I use the Jenkins Dynamic Plugin in a Jenkinsfile
?
What I am looking for is a Jenkinsfile snippet that:
Build wi
there is no need anymore for the Jenkins Dynamic Plugin anymore. Just use the normal choice or string parameter and have the value(s) updated by groovy code.
#!/bin/groovy
def envs = loadEnvs();
properties([
parameters([
choice(choices: envs, description: 'Please select an environment', name: 'Env')
])
])
node {
try {
stage('Preparation'){
...
If you use the choice parameter be aware the you must provide a string where the values are separated by a new line.
For example:
"a\nb\nc"
If you really need to plugin, then vote on this issue JENKINS-42149.