Create a Bamboo Release Label

How do I create a release label of the format YYYY-MM-DD_BuildNumber?

1 answer

0 vote

Hello Bobby,

Thank you for your question.

I would kindly ask you to set up a system environment variable as per following, on Linux:

export RELEASE_DATE=`date +%Y-%m-%d`
 
# as a response, you should expect
echo $RELEASE_DATE
2015-04-24

In case you are running Bamboo server on a Windows OS, please add a system environment variable as per following:

set RELEASE_DATE=!date:~10,4!-!date:~6,2!-!date:~4,2!
 
# as a response, you should expect
echo %RELEASE_DATE%
2015-04-24

Alternatively, Managing Environment Variables documentation.

Please, stop and start Bamboo so the new environment variable will become available to Bamboo.

Please, go to Bamboo's Release versioning screen and add the following under "Next release >> Version" input field:

${system.RELEASE_DATE}_${bamboo.buildNumber}

Please, refer to Naming versions for deployment releases documentation for further information.

If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.

Thank you for your understanding.

Kind regards,
Rafael P. Sperafico
Atlassian Support

This works for a day, but it requires you to restart Bamboo daily or the date doesn't change. Is something I can do besides restarting Bamboo.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,813 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you