I'm using Jenkins v2.1 with the integrated delivery pipeline feature (https://jenkins.io/solutions/pipeline/) to orchestrate two existing builds (build and deploy).
In my parameterized build I have 3 user parameters setup, which also needs to be selectable in the pipeline.
The pipeline script is as follows:
node: {
stage 'build'
build job: 'build', parameters: [[$class: 'StringParameterValue', name: 'target', value: target], [$class: 'ListSubversionTagsParameterValue', name: 'release', tag: release], [$class: 'BooleanParameterValue', name: 'update_composer', value: update_composer]]
stage 'deploy'
build job: 'deploy', parameters: [[$class: 'StringParameterValue', name: 'target', value: target]]
}
This works correctly except for the BooleanParameterValue
. When I build the pipeline the following error is thrown:
java.lang.ClassCastException: hudson.model.BooleanParameterValue.value expects boolean but received class java.lang.String
How can I resolve this typecasting error?
Or even better, is there a less cumbersome way in which I can just pass ALL the pipeline parameters to the downstream job.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…