I have been able to create a working DSL script that will build a new Job that will run a Conditional Build step with a Boolean logical operator based upon Build Parameter.
booleanParam('COMPILE_CHECK', false, 'Run code compile check.')
steps {
booleanCondition('${ENV,var="COMPILE_CHECK"}')
batchFile("_build\\BuildCI.bat Release")
batchFile("_build\\RunAllUnitTests.bat")
But I haven't been able to get work DSL that would run this Build Step, if one or more parameters are true:
parameters {
booleanParam('COMPILE_CHECK', false, 'Run code compile check.')
booleanParam('DEPLOY_CHECK', false, 'Run deploy check.')
}
steps {
conditionalSteps {
condition {
booleanCondition('${ENV,var="COMPILE_CHECK"}')
*** HOW DO YOU SAY "OR" HERE?
booleanCondition('${ENV,var="DEPLOY_CHECK"}')
}
steps{
batchFile("_build\\BuildCI.bat Release")
batchFile("_build\\RunAllUnitTests.bat")
}
}
}
I can make this type of configuration via the Jenkins GUI, just nothing that works here. My latest attempts give an error like this:
Processing provided DSL script
ERROR: (script, line 39) No signature of method: javaposse.jobdsl.dsl.helpers.step.RunConditionContext.conditions() is applicable for argument types: (script$_run_closure1$_closure4$_closure10$_closure18$_closure20$_closure21) values: [script$_run_closure1$_closure4$_closure10$_closure18$_closure20$_closure21@915290]
Possible solutions: getCondition()
TIA!