Jenkins pipeline - How to give choice parameters dynamically
问题 pipeline { agent any stages { stage("foo") { steps { script { env.RELEASE_SCOPE = input message: 'User input required', ok: 'Release!', parameters: [choice(name: 'RELEASE_SCOPE', choices: 'patch\nminor\nmajor', description: 'What is the release scope?')] } echo "${env.RELEASE_SCOPE}" } } } } In this above code, The choice are hardcoded (patch\nminor\nmajor) -- My requirement is to dynamically give choice values in the dropdown. I get the values from calling api - Artifacts list (.zip) file