DateTime Stamp in Bamboo

We are migrating from TFS Builds to Bamboo. In TFS build definitions, we have specified date time format as $(BuildDefinitionName)_2.11.01.$(Date:yyMMdd)$(Date:HHmm). With date time format, we were able to get better understanding of when builds were created.

For Bamboo integration, I was looking at this link https://octopus.com/docs/api-and-integration/bamboo. This page says I can use ${bamboo.buildNumber} as a argument for p:OctoPackPackageVersion. This just creates auto increment numbers like 1.0.1, 1.0.2. I would like something like 1.0.0.170210.0510.
Is there any way to do? Could you please suggest?

Hi,

Thanks for getting in touch. Atlassian have documentation around the available Bamboo variables here: https://confluence.atlassian.com/bamboo/bamboo-variables-289277087.html

It looks like the only time-based one they provide is bamboo.buildTimeStamp although that is a full ISO 8601 date, ie 2010-01-01T01:00:00.000+01:00 which wouldn’t be valid as a version number. They have an open ticket to add something more useful here https://jira.atlassian.com/browse/BAM-11636 but it doesn’t look like that has been updated in some time.

You may want to take a look at the Atlassian forums and see if someone has figured out how to expose the date in a different format as a variable.

Regards,
Mark