Best way to set the job description for multi branch pipelines

95 views
Skip to first unread message

Lee, David

unread,
Oct 17, 2018, 10:39:59 AM10/17/18
to jenkins...@googlegroups.com

Hi Jenkins users –

 

I am not seeing a really easy and clean way to set the Jenkins job description for multi branch pipelines. 

 

The following code works, however, the downside is 3 in-process script approvals are required (method org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder$BadgeManager getBuild,  field hudson.model.Run project, and method hudson.model.AbstractItem setDescription java.lang.String).

 

def project = manager.build.project

project.setDescription("My job description.")

 

Am I missing something?  Is there a better way to codify the job description into a Jenkinsfile and without requiring any script approvals?   Would I need to create a  Jenkins plugin?

 

Any advice appreciated.  Thanks. 

-D

 

 

Cuong Tran

unread,
Oct 18, 2018, 12:47:17 PM10/18/18
to Jenkins Users
Try this:

currentBuild.description = "You description"

Lee, David

unread,
Oct 22, 2018, 11:22:44 AM10/22/18
to jenkins...@googlegroups.com

Thanks for the reply. 

 

currentBuild.description = "You description"  sets the build description for each build.  I am looking for setting the job/project description. 

 

-D

--
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/e446d132-07cd-4dd0-9db0-0dddce1c1a92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages