Jenkins Pipeline设置build Name和Description(描述)

 

安装 build-name-setter 插件,然后使用如下:

script{

wrap([$class: 'BuildUser']) {
    def deploylog="${BUILD_USER} use pipeline  '${JOB_NAME}(${BUILD_NUMBER})' "
    println deploylog
    buildName "#${BUILD_NUMBER}-^^-${BUILD_USER}"
    //修改Description"
    buildDescription "$specificCause.shortDescription" 
}    

}

 

posted on 2020-08-19 14:05  momingliu11  阅读(2817)  评论(0编辑  收藏  举报