// Uses Declarative syntax to run commands inside a container. pipeline { agent { label "test" } post { failure { updateGitlabCommitStatus name: 'Jenkins Pipeline', state: 'failed' } success { updateGitlabCommitStatus name: 'Jenkins Pipeline', state: 'success' } } options { gitLabConnection('scm-gitlab') } triggers { gitlab( triggerOnPush: false, triggerOnMergeRequest: true, triggerOpenMergeRequestOnPush: "never", triggerOnNoteRequest: true, noteRegex: "jenkins build", skipWorkInProgressMergeRequest: true, ciSkip: false, setBuildDescription: true, addNoteOnMergeRequest: true, addCiMessage: true, addVoteOnMergeRequest: true, acceptMergeRequestOnSuccess: false, branchFilterType: "NameBasedFilter", includeBranchesSpec: "master", excludeBranchesSpec: "", pendingBuildName: "Jenkins Pipeline", cancelPendingBuildsOnUpdate: false, // secretToken: "abcdefghijklmnopqrstuvwxyz0123456789ABCDEF") ) } stages { stage('build') { steps { script { echo "build" } } } stage('deploy') { steps { script { echo "deploy" } } } } }
标签:Pipeline,false,示例,gitlab,build,Jenkins,true From: https://www.cnblogs.com/jpinsz/p/16598865.html