I want to get Getting current timestamp in inline pipeline script using pipeline plugin of hudson. For setting up build display name.
Inline groovy script used:
Just format the Date object:
Date
stage('Foo') { steps { script { def now = new Date() println now.format("yyMMdd.HHmm", TimeZone.getTimeZone('UTC')) } } }