pipline获取git提交信息

stage('获取git提交信息') {
steps {
script {
git_commit = sh (script: 'git log -1 --pretty=%B ${GIT_COMMIT}', returnStdout: true).trim()
echo "git_commit: ${git_commit}"
}
}
}

posted @ 2021-08-11 14:28  没有猫的猫奴  阅读(151)  评论(0)    收藏  举报