Jenkins Declarative Pipeline: How to read choice from input step?
问题 I'm trying to access a variable from an input step using the declarative pipelines syntax but it seems not to be available via env or params . This is my stage definition: stage('User Input') { steps { input message: 'User input required', ok: 'Release!', parameters: [choice(name: 'RELEASE_SCOPE', choices: 'patch\nminor\nmajor', description: 'What is the release scope?')] echo "env: ${env.RELEASE_SCOPE}" echo "params: ${params.RELEASE_SCOPE}" } } Both echo steps print null . I also tried to