Warm tip: This article is reproduced from serverfault.com, please click

Jenkins Pipeline: Enable timestamps in build log console

发布于 2017-10-31 16:13:16

How can I display build timestamps for each line of a multi-branch pipeline project? Is it a supported feature? If yes, does it need to be enabled in the Jenkinsfile or is there a GUI option?

Questioner
lanoxx
Viewed
0
874 2018-07-11 15:16:15

For scripted pipeline just wrap your script in timestamps { } Eg.

timestamps {
  // do your job
}

Note: You must have the timestamper plugin installed: wiki.jenkins.io/display/JENKINS/Timestamper