How do I establish the Build Timestamp during a deploy?

Michael Heyns December 12, 2016

During build I am storing information to a remote server in a direcory

/path/December-2016/BUILD-PLAN-KEY/

I would like to retrieve this during Deploy.

 

The Bamboo variable bamboo.buildTimeStamp is not available.

Is there any way for me to deduce the month-year value of a past build?

1 answer

1 vote
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 16, 2016

Hello Michael,

This variable (bamboo.buildTimeStamp) is available to builds not deployments.

The are a few things you could do:

  1. create an artifact with the result of (bamboo.buildTimeStamp) and consume it in your deployment
  2. run an REST API call (https://docs.atlassian.com/bamboo/REST/5.14.1/#d2e439) from a Script task and parsing its result
http://localhost:8085/rest/api/latest/result/${bamboo.buildResultKey}.json

Kind regards,
Rafael P. Sperafico

JohnMelody March 27, 2019

Hi, 

I want to use the build time stamp in a deployment. 

The artifact definition has three fields 

name, location and copy pattern. 

How do I do your option 1 i.e. create an artifact with the result of bamboo.buildTimeStamp? Do I have to store it to a file or something? 

Thanks for any help

John. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events