Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to avoid a commit/release loop with Maven and CI?

I'm trying to implement the following chain using my (Bamboo) CI server:

Code Commit (GIT, Maven Snapshot Version)
|
v
CI Build + Test 
| 
v
CI runs Maven release

The problem is that because the Maven release updates the POM to bump the version to the next SNAPSHOT release, the first step of the chain is triggered again.

What are the standard ways of avoiding this?

like image 379
Thom Shutt Avatar asked Jun 16 '26 00:06

Thom Shutt


1 Answers

I have run into a similar issue using the sbt-release plugin. Using Bamboo, in your linked repositories, there is an advanced configuration field labeled Exclude Changesets. You can input a regular expression so that every commit with a message matching that regexp will not trigger a change.

I have set mine to (?:Setting version to)[\s]+([0-9\.]+) to match my version bump messages.

like image 173
mor Avatar answered Jun 18 '26 12:06

mor



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!