方式一:
需要安装插件:Build Name and Description Setter
pipeline {
agent any
stages {
stage('Hello') {
steps {
echo 'Hello World'
buildDescription "构建人:admin"
}
}
}
}
方式二:
安装插件:build-user-vars-plugin
pipeline {
agent any
stages {
stage('test') {
steps {
wrap([$class: 'BuildUser']) {
script {
BUILD_USER = "${env.BUILD_USER}"
currentBuild.description = " 构建人 : ${BUILD_USER}"
}
}
}
}
}
}



