Hi,
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?
Since this issue was due to the commit message format. I had added a custom commit message in commit hooks and allowed maven release to check-in the files using default commit message beginning with [maven-release-plugin]. This resolved the issue.
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.
Enter into File Pattern a regular expression to match the files that Bamboo includes or excludes. The regex pattern must match the file path in the repository. See this page for examples.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.