I have a bamboo CICD pipeline using maven build and release. Have created a trigger of type "Repository triggers the build when changes are committed" and my repository is Stash.
Whenever there is a change in my repository, build pipeline is getting triggered. Last step of my build pipeline is maven release which updates and checks in the pom file. This check-in is in turn invoking the pipeline resulting in a loop. Is there any way this loop can be stopped by not invoking the pipeline for pom file changes checked in by bamboo?
This can be achieved via the advanced option Include/Exclude Files when you configure a source repository in Bamboo, see section 'Change detection options' within Bitbucket Server (formerly Stash):
Allows you to specify the files that Bamboo should, or should not, use to detect changes. When you configure the Include option, it means that you want Bamboo to use only the mentioned files for change detection (by default Bamboo checks all the files). In the same way, if you configure the Exclude option, Bamboo will not consider the excluded files when detecting changes.
Hi Steffen, Thank you for the response. Guess the above mentioned option excludes matching files checked in by all users but I need to exclude only the checkins made by Bamboo. When a user checks in pom file, build should still be triggered automatically. Is it possible to ignore checkins made by Bamboo alone?
From the information I have got, Bamboo always ignore the commits starting with "[maven-release-plugin]" by default. Since I had pre commit hooks which checks for the commit messages, I have added a different commit message for the files checked in by maven release. This might be a reason why Bamboo is not ignoring these checkins.
Is there any way that Bamboo can ignore commits with certain pattern?
G’day Community! As we gear up to introduce Bamboo Data Center to the world, we wanted to make sure that we shared a bit more about Bamboo, the product. Our team has put together an overview video ...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events