I have installed Description Setter Plugin but I don't know if and how I can use the BUILD_ID which in jenkins/env-vars.html/ is displayed in the format: "2005-08-22_23-59-59" (YYYY-MM-DD_hh-mm-ss). Does anyone know if I can use it and how?
Displaying the BUILD_ID would be the easiest way to add timestamp to the build description, but if not possible, how can I achieve that?
Thanks!
They replaced the ${BUILD_ID} variable to contain the build number instead of this timestamp (since 1.597+). See https://issues.jenkins-ci.org/browse/JENKINS-26520
There are some workarounds with other plugins like EnvInject or you just use the regexp feature of the Description Setter Plugin like this:
echo "date:" $(date +'%Y-%m-%d_%H-%M-%S')date:(.*)\1If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With