Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bamboo build plan in a loop after using maven release

Deepak January 29, 2018

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?

 

2 answers

1 accepted

0 votes
Answer accepted
Deepak February 22, 2018

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.

0 votes
Steffen Opel _Utoolity_
Community Champion
January 30, 2018

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.

Deepak January 30, 2018

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? 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events