Add harness variable for current datetime stamp
long-term
T
Thoughtful Locust
Currently Harness does NOT provide support for getting the current date-time stamp, as a variable to use in a pipeline.
The current workaround is to use a shell script to get the time and set such a variable which adds delay to the pipeline.
It would be more efficient if Harness including a current-date-time variable.
Log In
I
Inkwell Roadrunner
Its been almost a year but still we have not got a harness variable which can print timestamp in a human readable format. Is there any ETA for this? <+pipeline.startTs.format("yyyyMMdd")> gives null value.
Canny AI
Merged in a post:
New build date variable needed
J
Jade Firefly
I want to be able to push a docker tag with the format yy.mm.xxxxx for the build date.
However, the variables at https://developer.harness.io/docs/platform/variables-and-expressions/harness-variables/#ci-codebase-and-environment-variables and https://developer.harness.io/docs/continuous-integration/use-ci/codebase-configuration/built-in-cie-codebase-variables-reference/ don't provide a way for me to do this.
Rohan Gupta
long-term
We can expose a variable
Rohan Gupta
Merged in a post:
RFE -date time method . Can harness add a date time method ? Such as current date,time in various formats, convert <+pipeline.startTs> to a ddmmyyyy type format and basic date arithmetic
N
Novel Cod
Rohan Gupta
Merged in a post:
Add human-readable timestamp variable for pipeline use
M
Merlot Bear
We want to add an annotation to our deployments showing when Harness touched the object last. We found <+pipeline.startTs> from https://developer.harness.io/docs/platform/variables-and-expressions/harness-variables/
... but we would like a human-friendly timestamp to be available as well, perhaps <+pipeline.startUtc>, something along those lines?
A
Amazing Puffin
It should work but it is not. I've got null instead.
N
Novel Cod
Amazing Puffin interesting. can you provide the doc link for this?
M
Merlot Bear
This seems to work and fit the need. I added it to our manifest, ran a pipeline, and the annotation reflects a UTC timestamp. Looks good to me, thanks!