Jenkins pipeline plugin: set the build description

后端 未结 4 1528
自闭症患者
自闭症患者 2021-02-02 05:51

I\'m trying to replace our current build pipeline, currently hacked together using old-school Jenkins jobs, with a new job that uses the Jenkins pipeline plugin, and loads a

4条回答
  •  失恋的感觉
    2021-02-02 06:46

    Just figured it out. The pipeline job exposes a currentBuild global variable with writable properties. Setting the description can be done with:

    currentBuild.description = "my new description"
    

    anywhere in the pipeline script. More information in this DZone tutorial.

提交回复
热议问题