In a paramatized job that displays to the user some options before executing it, I also need to show a "dynamic" dropdown. I believe the way to do this is using the Extensible Choice option.
Can I execute a shell script in this option's Groovy Script textarea?
The below does not seem to be executed when starting the job and the job UI is displayed.
sh """
bx login -a https://... -c ... -u ... -p ...
bx cs clusters | tail -n +3 | cut -d ' ' -f 1 > clusters.txt"
def clusters = readFile('clusters.txt').trim()
"rm -rf clusters.txt"
clusters