I have a unique issue. I have one build system that needs one set of params to start a job and another jenkins server that needs to use the same Jenkinsfile but have a different set of options to select from. Think of it as a jenkins server in region 1 and another in region 2 and they need a different set of options
I have this
pipeline {
agent any
environment {
ENV_NAMES = readFile "/etc/env_list"
}
parameters {
// choices are newline separated
choice(choices: "${env.ENV_NAMES}", description: 'What Environment?', name: 'env')
}
}
Right now the choice is coming up as null
but i'd love a way to source an outside file to import those.
I have config management that can place a file with data in it.
So server one would get like
env1
env2
env3
And server2 would get
prod1
prod2
prod3