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

From: [email protected] <[email protected]> On 
Behalf Of Cuong Tran
Sent: Thursday, October 18, 2018 9:47 AM
To: Jenkins Users <[email protected]>
Subject: Re: Best way to set the job description for multi branch pipelines

Try this:

currentBuild.description = "You description"

On Wednesday, October 17, 2018 at 7:39:59 AM UTC-7, Lee, David wrote:
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


--
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 
[email protected]<mailto:[email protected]>.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/e446d132-07cd-4dd0-9db0-0dddce1c1a92%40googlegroups.com<https://groups.google.com/d/msgid/jenkinsci-users/e446d132-07cd-4dd0-9db0-0dddce1c1a92%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/db6eab829ec748ad9092cbc19a17c76a%40EXCAMB02.rpega.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to