Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. job('example') {
  2. parameters {
  3. activeChoiceParam('CHOICE-1') {
  4. description('Allows user choose from multiple choices')
  5. filterable()
  6. choiceType('SINGLE_SELECT')
  7. groovyScript {
  8. // script('["choice1", "choice2"]')
  9. script('-DYNANIC CHOICES-REF-PESUDO-CODE')
  10. fallbackScript('"fallback choice"')
  11. }
  12. }
  13. }}
  14.  
  15. groovyScript {
  16. script('
  17. // call git repo and fetch some branches info.
  18. // collect them in some local variable and return them as choices
  19. def branches = "git branch -l"
  20. return branches
  21. ')
  22. fallbackScript('"fallback choice"')
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement