'Job DSL - How to configure postBuildSteps for maven to kick off only if build is successful
Is there way in job dsl to configure postBuildSteps only if build succeeds, for a maven job. I saw there is postSuccessfulBuildSteps which applies only to release job.
Solution 1:[1]
This works:
postBuildSteps("SUCCESS") {
...
}
Solution 2:[2]
Can't you use conditional step plugin ( https://wiki.jenkins-ci.org/display/JENKINS/Conditional+BuildStep+Plugin)?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | T3rm1 |
| Solution 2 | nerdioculos |
