Forums

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

Pipeline in loop when using maven-release-plugin.

Patrik Halén
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 12, 2018

I have a pipeline setup to do a automated release when I commit to a specific branch. The problem is that maven-release-plugin that I use commit its changes to the same repository and branch. This triggers the same pipeline and creates a loop.

How to exclude sertain commits for a specific branch?

- step:
name: TEST01 - Automatic build and test
caches:
- maven
script:
# Here I would like to add a check to stop if some criteria is met like commitmessage==[maven-release-plugin] or something similar
- mvn release:clean release:prepare --batch-mode -f ggw-core/pom.xml -s ggw-core/external/settings-test01.xml
- mvn release:perform -f ggw-core/pom.xml -s ggw-core/external/settings-test01.xml -X -e

1 answer

1 accepted

1 vote
Answer accepted
mwatson
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2018

Add 

-DscmCommentPrefix="[skip ci]"

to the release:prepare command as shown in https://community.atlassian.com/t5/Answers-Developer-Questions/How-can-I-configure-my-pipeline-to-control-versioning/qaq-p/553721#M91377

This will make pipelines ignore the new commits. 

Patrik Halén
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 13, 2018

Works flawlessly!!

Thank you!

You saved the week!! :) :) :)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events