Forums

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

Bamboo and maven release plugin

CI Engineer October 3, 2012

Hi,

I was wondering if there is a way in which Bamboo can be made interactive. I am working on automating the maven release:prepare and perform in bamboo plans. The issue is that the plan fails as I have to resolve snapshot dependencies before the release:prepare. Hence was wondering if we can make bamboo take input when it runs.

1 answer

1 accepted

0 votes
Answer accepted
Felipe Cuozzo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 7, 2012

Hi Maverick,

What you can try is creating a profile in the pom.xml that enables the Enforcer plugin to prevent Snapshot dependencies, see http://maven.apache.org/plugins/maven-enforcer-plugin/rules/noSnapshots.html

Then you can have two different Stages on the Bamboo Plan.

1. Builds and tests (i.e. mvn verify) with the noSnapshots profile so it will fail if something is wrong.

2. Manual Stage so it will only allow you to run the release:prepare if the previous stage was successful.

Does this accomplish what you're trying to do? If not, can you please explain better what would be the input you expect Bamboo to ask for?

Cheers,
Felipe
OnDemand Dev

CI Engineer October 7, 2012

Thanks Felipe. But the solution provided doesnt look good to me. The thing achieved by the enforcer plugin doesnt seem to be very useful as the maven release plugin by default fails if there are SNAPSHOT dependencies. So adding a profile to check the same seems redundant to me.

I will only perform a release after sorting the SNAPSHOT issue but wanted to chek if there is any feature in Bamboo where the command line interactive mode can be emulated using bamboo. So for instance when I say mvn:release it should pop up a window asking me for resolving the dependencies and then ask for the release version, tag name etc. Just wondering if that is possible in Bamboo.

Felipe Cuozzo
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 8, 2012

Usually here at Atlassian we use the default suggested tag name and version bump strategy used by Maven and specify the --batch-mode so Maven will use the default values on the mvn release:prepare step, moreover we have a policy of not commiting SNAPSHOT dependencies to the STABLE/RELEASE branch so it prevents you from hitting the crossroad of having to sort out SNAPSHOT deps just before a release, again this is just one of the ways of approaching this issue.

But answering your question, no, Bamboo doesn't have a interactive mode/popup-like way in Bamboo to ask for user input during the execution of the build process.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events