简体   繁体   中英

Jenkins Pipeline ignores exludeMessage Option for git checkout

My jenkins pipeline checks out the GIT repository in the first stage, there fore I'm using

checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [[$class: 'MessageExclusion', excludedMessage: '.*\\[Gradle-Release-Plugin\\].*'], [$class: 'LocalBranch', localBranch: 'master']], submoduleCfg: [], userRemoteConfigs: [[credentialsId: '48b64fd8-f0c8-4bcd-91e8-58f763e9be0c', url: 'https://bitbucket.org/private/private.git']]])

To prevent builds for automatic version change commit, the excludeMessage options is used. Nevertheless Jenkins starts builds if commits occur with this pattern. The regex pattern is correct, I double checked it. Does somebody facing the same problem?

That is indeed a bug whose resolution is still pending.

See issue JENKINS-36195 "Pipeline polling ignores special polling rules" .
The same issue is seen in " JENKINS-35988 Organization job "Branch Indexing" ignores excluded regions defined in jenkinsfile "

The current assessment is:

Since the git plugin doesn't read the contents of Jenkinsfile when performing polling, I'm not sure how it would honor the polling settings inside the Jenkinsfile in the repository.
It seems like it would be even more challenging in a repository with more than one branch, since the polling settings might differ between branches within the same repository.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM