I have a Jenkins job that needs to have a Post-build Action of "Flexible publish" with a "Boolean condition" and the "Action" needs to be "Trigger parameterized build on other projects" with a "Trigger when build is" "Stable". Here is the dsl of what I need:
publishers {
downstreamParameterized {
trigger('My_Job') {
parameters {
currentBuild()
sameNode()
}
}
}
}
Problem is if I put this inside a step to get the boolean condition, it totally changes the outcome:
publishers {
flexiblePublish {
conditionalAction {
condition {
booleanCondition('${RunDownstream}')
}
steps {
downstreamParameterized {
trigger('My_Job') {
parameters {
currentBuild()
sameNode()
}
}
}
}
}
}
}
What I get when it is in a step is "Trigger/call builds on other projects" instead of "Trigger parameterized build on other projects" without a trigger condition.
Has anyone else ran in to this? Is there a way to change this? Help! :)