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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Embed a Date into a Build Artifact

I have a build plan that produces a zip file as an artifact. Right now, it is called build.zip. I was wondering if it possible to name it based off the Date or Rev of the build such as build_01_19_18_rev12345.zip. I wanted to try to help avoid people mixing up builds, since currently their download folder will just have a series of generic build.zip files.

1 answer

You can achieve this by facilitating Bamboo variables in the build step that produces the artifact, in particular you likely want to use ${bamboo.buildTimeStamp} and/or ${bambooBuildNumber}.

The specifics depend on the build step you are using to produce the artifact, but all Bamboo tasks including the Script task should support the required variable substitution at build time just fine - the examples for Maven ant Ant illustrate the general concept.

Thanks for the response. Is there any way to set the value of a bamboo variable from within a script? Or do some string manipulation of other bamboo variables? Example, could I just get the date without the time.

Yes, but only with an indirection - you can manipulate the variable values in a script, write them to a file, and then inject them again as new variables by means of one of the following tasks:

You can then refer to the newly injected variables from subsequent tasks.

Awesome thank you very much.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

986 views 4 7
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you