Jenkins Build History 呈現自定義內容

效果展示:


需要安裝插件:Build Name and Description Setter
pipeline示例:

pipeline {
    agent any
    stages {
        stage("Initialization") {
            steps {
                // use name of the patchset as the build name
                buildName "${GERRIT_CHANGE_SUBJECT}"
                buildDescription "Executed @ ${NODE_NAME}"
            }
        }
    }
    post {
        failure {
            // in case of failure, we'd like to have simple 'git blame' on build history :)
            currentBuild.displayName = 'This build needs help!!!'
            buildDescription("Committer: ${GERRIT_PATCHSET_UPLOADER_NAME}")
        }
    }
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章