Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- job('example') {
- parameters {
- activeChoiceParam('CHOICE-1') {
- description('Allows user choose from multiple choices')
- filterable()
- choiceType('SINGLE_SELECT')
- groovyScript {
- // script('["choice1", "choice2"]')
- script('-DYNANIC CHOICES-REF-PESUDO-CODE')
- fallbackScript('"fallback choice"')
- }
- }
- }}
- groovyScript {
- script('
- // call git repo and fetch some branches info.
- // collect them in some local variable and return them as choices
- def branches = "git branch -l"
- return branches
- ')
- fallbackScript('"fallback choice"')
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement