Omi
Omi

Reputation: 21

Jenkins HTML publisher plugin when folder name contains a timestamp

Hello im using HTML publisher plugin,

But the html files are created in runtime with timestamp for

E:\reports\html\22-08-1982

So how do we specify the "timestamp" folder in the path location

Upvotes: 2

Views: 4196

Answers (2)

djangofan
djangofan

Reputation: 29669

Here is how I did it. A picture is worth a thousand words.

Gatling logs a report folder name that ends with a timestamp containing milliseconds and that folder name is logged in a file called lastRun.txt .

enter image description here

Upvotes: 0

gile
gile

Reputation: 5976

If in your case timestamp means the build timestamp, you can:

  • Install zentimestamp plugin.
  • Go to "Manage Jenkins" -> "Configure system"
  • Enable Global property "Date pattern for the BUILD_TIMESTAMP (build timestamp) variable"
  • Set "Date and Time pattern" to dd-MM-yyyy
  • Save the configuration

Then you can use ${BUILD_TIMESTAMP} in HTML publisher plugin, e.g. HTML directory to archive:

reports/html/${BUILD_TIMESTAMP}

Upvotes: 2

Related Questions