Jenkins Pipeline: Enable timestamps in build log console

lanoxx picture lanoxx · Oct 31, 2017 · Viewed 35.1k times · Source

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?

Answer

Samer Makary picture Samer Makary · Nov 8, 2018

Adding options to the declarative pipeline

pipeline {
  agent any
  options { timestamps () }
  // stages and rest of pipeline.
}

Credit goes to the comment above Jenkins Pipeline: Enable timestamps in build log console