Currently I've got an input() call in my Jenkinsfile that prompts users to select a branch name to manually deploy:
userInput = input(
id: 'userInput', message: 'Manual Deploy?', parameters: [
[$class: 'ChoiceParameterDefinition', choices: 'develop\nmaster\nPR-124', description: 'Branch to deploy', name: 'branch', defaultValue: 'develop'],
])
Instead of hardcoding a list branch names, how can I dynamically build this list based on the list of the pull requests that are already known to Jenkins in our multlbranch pipeline configuration?
Jenkins is configured to automatically build new pull requests already.
Thanks,
Mark