I have a few existing jobs created by the Jenkins UI and i'm trying to run them as part of a pipeline script.
The problem i'm facing is that in most jobs i have "Active Choices Reactive Parameter" parameters which is being populated by a scriptler script and requires a value selection to build the job.
My goal is to automatically build the job and to set by code a test value but everything i tried until now failed. for example:
stage('Test') {
build job: 'Test-regression', parameters: [
[$class: 'WHideParameterValue', name: 'envListDb', value: 'TestEnvironmentListByOperator'],
string(name: 'Operator', value: 'TestOp'),
validatingString(name: 'OperatorValidation', value: 'TestOp'),
string(name: 'Environment', value: 'Test'),
validatingString(name: 'EnvironmentValidation', value: 'Test')
]
}
When running this i got "the parameter 'Operator' did not have the type expected by Test-regression. Converting to Active Choices Reactive Parameter" so as mentioned i guess the problem is not having an actual selected value for the build itself.
I might be doing it the wrong way but i would appreciate if anyone has an idea which would spare me the need to create a new layout just for the pipeline testing. Thanks