In my build setup I have Release builds and Continuous builds (which poll scm). I use the maven-release-plugin in the pom.xml and use the goal release:prepare release:perform in the Release builds. This goal checks in the code from SVN, does the deployment and increments the artifact.version number in the pom.xml and re-commits it to SVN. Therefore, since the pom.xml was committed to SVN, and the Continuous build is polling SCM, it gets triggered and runs the Continuous build. How can I make it NOT trigger the Continuous build when the release goal updates the pom.xml and commits it ?
As illustrated by the question "Run jenkins job if only SCM comment match pattern", you can configure the continuous build to run if the commit comment doesn't match a certain value (like "release").
In your case, that would allow you to avoid the extra builds when releasing, providing you follow a comment convention when modifying the pom.xml
before a release.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With