jenkins-pipeline

Jenkins Pipeline: Enable timestamps in build log console


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?


Solution

  • 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