Pipeline: How to modify Build History status monitor

39 views
Skip to first unread message

Mike Craig

unread,
Feb 27, 2019, 5:12:23 PM2/27/19
to Jenkins Users
Hello,

Prior to using declarative pipeline, we were able to modify the Build History to indicate information we wanted to see.
We are using a shared "terraform-deploy" pipeline now and would like to modify this build history to display which project (aka component) was built in that run.

build history.png


Thank you,

Mike

Andreas Magnusson

unread,
Feb 28, 2019, 1:54:44 AM2/28/19
to Jenkins Users
Not quite sure what you want to do, but we modify currentBuild.displayName and currentBuild.description from within our pipeline.
They are documented under Pipeline Syntax | Global Variable Reference

/Andreas

Mike Craig

unread,
Feb 28, 2019, 11:48:19 AM2/28/19
to jenkins...@googlegroups.com
Perfect, thank you for the reference! Having a "how-to" question, and mapping that to a documentation section is the hardest part for me. :)

--
You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/GY9ouPE496U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/bbf0bdca-3bd6-4e4d-a163-7e282fa25336%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Simon Bayer

unread,
Feb 28, 2019, 12:48:46 PM2/28/19
to jenkins...@googlegroups.com
Hi Mike, u could use the object 'currentbuild' to modify the job description. Its available in declarative pipeline builds (e.g. with multiproject pipeline plugin). Furthermore the build status can be set. But beware: if u set the status to 'failure', Post build actions for failures will not be triggered. Use the default step 'error' instead.

Script-Example:
script {
currentBuild.description = 'Jenkins is awesome'
currentBuild.status = 'success'
}

Greets



-------- Ursprüngliche Nachricht --------
Von: Mike Craig <mwc...@gmail.com>
Datum: 27.02.19 23:12 (GMT+01:00)
An: Jenkins Users <jenkins...@googlegroups.com>
Betreff: Pipeline: How to modify Build History status monitor

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/c7a6018e-3600-42f7-91c5-56caeae99bdc%40googlegroups.com.

Mike Craig

unread,
Feb 28, 2019, 1:40:29 PM2/28/19
to jenkins...@googlegroups.com
Thank you!

You received this message because you are subscribed to a topic in the Google Groups "Jenkins Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/GY9ouPE496U/unsubscribe.
To unsubscribe from this group and all its topics, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/BN8PR15MB3441DF5E5735C011915B8C2BAC750%40BN8PR15MB3441.namprd15.prod.outlook.com.
Reply all
Reply to author
Forward
0 new messages