Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ignore pom.xml commits when jenkins polls SCM

Tags:

svn

maven

jenkins

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 ?

like image 252
Sarith Avatar asked Nov 05 '22 09:11

Sarith


1 Answers

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.

like image 198
VonC Avatar answered Nov 09 '22 11:11

VonC