Jenkins change Build History timestamps

Viewed 529

I have a Multibranch Pipeline in Jenkins. My goal is to change the Timestamps of the Builds in the History. I was able to change the DisplayName (#13 to 'test') as shown in the picture below, but not the timestamp. Is this possible, and if so, how?

enter image description here

1 Answers

After googling for some time I found one wonderful plugin.

https://plugins.jenkins.io/groovy-postbuild/

Groovy Post Build.

This plugin can help you to add custom text, plugin-predefined Icons In Build History side pane after build Timestamp. Like

enter image description here

And this plugin has some other icons also and we can give on hover to those icons.

It's really fun to implement cool stuff there. This plugin has very good documentation and well-defined Examples.

Please have a look, This will resolve your problem.

PS: you need to write some groovy script

[update]

Install plugin:

Jenkins > configure > manage plugin > Avaialble > search for Groovy PostBuild > Install and restart Jenkins

How to use:

Start Configure your project. If the project is FreeStyle then go to post build tab in the configuration page. Like this:


enter image description here


A textArea will open now add your Script as described in Examples.


enter image description here


Now Apply and save. Run the build and tadaaaa.. your message is in build history pane.


enter image description here


I think this could help you to setup and run script

Related