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].
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 via email to