Jenkins 管道忽略 git 结帐的 exludeMessage 选项

Jenkins Pipeline ignores exludeMessage Option for git checkout

我的 jenkins 管道在第一阶段检查了 GIT 存储库,因此我正在使用

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']]])

为了防止自动版本更改提交的构建,使用了 excludeMessage 选项。尽管如此,如果使用这种模式进行提交,Jenkins 就会开始构建。正则表达式模式是正确的,我仔细检查了它。有人遇到同样的问题吗?

这确实是一个错误,其解决方案仍在等待中。

参见issue JENKINS-36195 "Pipeline polling ignores special polling rules"
同样的问题出现在“JENKINS-35988 Organization job "Branch Indexing" ignores excluded regions defined in jenkinsfile

目前的评价是:

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.