-
Type:
Bug
-
Resolution: Not A Defect
-
Priority:
Blocker
-
Component/s: pipeline-model-definition-plugin
-
Environment:pipeline model definition plugin version 0.6
Jenkins 2.25
I'm not able to use both parameters and build with boolean parameter because the build step need a boolean value and i can only pass the value with a string:
#!/usr/bin/env groovy
pipeline {
agent any
parameters {
booleanParam(defaultValue: false, description: 'Simulate the promotion', name: 'SIMUL')
}
stages {
stage('promote') {
steps {
build job: 'promote', parameters: [
booleanParam(name: 'SIMUL', value: "${env.SIMUL}")
]
}
}
}
}
will generate this kind of error:
java.lang.ClassCastException: hudson.model.BooleanParameterValue.value expects boolean but received class java.lang.String