Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,644,335
Community Members
 
Community Events
196
Community Groups

What the correct way of tagging a build with the Jira version when using Jira's Release with Build

Edited

I have finally got around to trying to make the "Release with Build" Jira functionality work with our Bamboo builds for tagging a release. However, I cannot seem to get it to tag the build with the Jira release name/version even though I think I have set things up correctly.

Environment:

  • JIra Cloud
  • Bamboo 7.0.4

I have a Build Plan, with two stages, with the second stage set as a manual stage for "Tag and Release".

Within the second stage, I have a "Repository Tag" Task configured, with the relevant repository, and the Tag name set to "RELEASE-${bamboo.jira.version}".

After triggering the build from Jira, using the "Release with new build" functionality (after working around the very limited build selection by modify the HTML value for the check box to the correct build), the build stage was correctly triggered and ran.

The source was tagged, but the tag name was literally "RELEASE-${bamboo.jira.version}".

Here's an extract from the build log for the manual stage:

simple	24-Jun-2020 20:08:48	Starting task 'Tag the source code with the Jira version details' of type 'com.atlassian.bamboo.plugins.vcs:task.vcs.tagging'
simple	24-Jun-2020 20:08:50	Warning: Permanently added '[127.0.0.1]:44649' (RSA) to the list of known hosts.
simple	24-Jun-2020 20:09:15	Git LFS: (0 of 0 files, 85 skipped) 0 B / 0 B, 790.86 MB skipped               
simple	24-Jun-2020 20:09:17	To ssh://127.0.0.1:44649/XXXXX/XXXXXXX.git
simple	24-Jun-2020 20:09:17	 * [new tag]             RELEASE-${bamboo.jira.version} -> RELEASE-${bamboo.jira.version}
simple	24-Jun-2020 20:09:17	Git LFS: (0 of 0 files, 85 skipped) 0 B / 0 B, 790.86 MB skipped               
simple	24-Jun-2020 20:09:17	Finished task 'Tag the source code with the Jira version details' with result: Success
s

As you can see, it created a nice tag, with a not so nice name, and certainly not the intended name.

I should also add that I have other "Repository Tag" Task configured using other Bamboo build variables, and they substitute the variables in without issue.

And now my question: Any ideas what I am doing wrong, or if this functionality works properly?

Thanks,

Robert

1 answer

1 accepted

0 votes
Answer accepted

So after working with Atlassian Technical Support a bit, and doing the logical thing at their suggestion (which I didn't think of) and adding a "Dump variables to log", I discovered the variables are not named as documented when triggering the manual stage.

What I found was that the variables should be named:

bamboo.triggerReason.jiraBaseUrl
bamboo.triggerReason.jiraProjectKey
bamboo.triggerReason.jiraProjectName
bamboo.triggerReason.jiraUserDisplayName
bamboo.triggerReason.jiraUsername
bamboo.triggerReason.jiraVersion
bamboo.triggerReason.jiraVersionId

Once I switch my tag name to use "${bamboo.triggerReason.jiraVersion}" things now behave as expected (ignoring the lack of builds to choose from when triggering).

I'm not sure if this is what Atlassian intends for people to do or not -- hopefully the  support team will let me know soon.

But I'm sharing this information in the hopes that it helps someone else.

Final note from support ticket - technical support person expected the documentation will be updated to reflect what I shared above.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events