Hey everyone, I’m struggling to find the best way to handle releases using Maven 2, Bamboo 3.1, and JIRA 4.3. I’ve tried a bunch of different approaches, but I keep running into problems.
What I’m aiming for is to have JIRA control the versions, Bamboo use those versions to build stuff with Maven, and then put those builds in our Nexus repository.
I’ve tried using placeholders in the poms, but that messes up the deployed versions. I also looked into using the Maven Release Plugin with Bamboo, but there are issues with version incrementing.
Here’s a quick example of what I tried with placeholders:
I have had a positive experience by using the Maven Versions Plugin with a custom Bamboo task. In our approach, a JIRA webhook triggers the Bamboo build when a version is marked for release. Then, a script in Bamboo fetches the version from JIRA via its REST API and the Maven Versions Plugin updates the POM files using the command mvn versions:set -DnewVersion=${JIRA_VERSION}. The build proceeds and is deployed to Nexus, and the changes are committed back to the repository. This method ensures JIRA remains the source of truth and avoids the issues with placeholders.
I’ve been in a similar situation, and I can share what worked for us. We ended up using the Maven Release Plugin, but with a twist. Instead of relying on version incrementing, we integrated a custom Groovy script into our Bamboo build process.
The script fetches the current version from JIRA, updates the POM files accordingly, and then triggers the Maven release. This way, JIRA remains the source of truth for versioning.
We also implemented a post-build task in Bamboo that updates the JIRA version status to ‘Released’ and creates the next version automatically.
One crucial thing we learned: make sure your SCM credentials are properly set up in Bamboo for the release plugin to work smoothly.
It took some trial and error, but this approach has been working well for us for over a year now. It’s not perfect, but it’s a solid starting point. Hope this helps!
hey, hav u tried using the maven-jgitflow-plugin? it’s pretty sweet for handling releases. it integrates nicely with jira and bamboo. u can configure it to use jira versions and it’ll handle all the version bumping stuff automatically. might be worth checkin out if u haven’t already. good luck!