admin管理员组文章数量:1384181
I have created a CI pipeline that is triggered when changes are pushed/merged into branch: "master".
trigger:
batch: true
branches:
include:
- master
pool:
vmImage: windows-latest
jobs:
- job: Build
condition: and(succeeded(),not(contains(variables['Build.SourceVersionMessage'], '[skip ci]')))
steps:
- script: echo "Hello world"!
displayName: 'Echo Hello world'
- script: echo "$(Build.SourceVersionMessage)"!
displayName: 'Echo Build.SourceVersionMessage'
I want my pull request to not trigger this pipeline.
Is it possible to skip the CI pipeline if the pull request contains something like "[skip ci]"?
I know that something similar is possible when directly pushing into master, per the docs.
As you can see in the code above, I also tried a condition on the job, but it somehow always runs.
I have created a CI pipeline that is triggered when changes are pushed/merged into branch: "master".
trigger:
batch: true
branches:
include:
- master
pool:
vmImage: windows-latest
jobs:
- job: Build
condition: and(succeeded(),not(contains(variables['Build.SourceVersionMessage'], '[skip ci]')))
steps:
- script: echo "Hello world"!
displayName: 'Echo Hello world'
- script: echo "$(Build.SourceVersionMessage)"!
displayName: 'Echo Build.SourceVersionMessage'
I want my pull request to not trigger this pipeline.
Is it possible to skip the CI pipeline if the pull request contains something like "[skip ci]"?
I know that something similar is possible when directly pushing into master, per the docs.
As you can see in the code above, I also tried a condition on the job, but it somehow always runs.
Share Improve this question edited Mar 18 at 9:37 kopolomo asked Mar 18 at 7:44 kopolomokopolomo 371 silver badge7 bronze badges 7 | Show 2 more comments1 Answer
Reset to default 1I am afraid this behavior is by design.
As outlined in this document,
Finally, after you merge the PR, Azure Pipelines will run the CI pipelines triggered by pushes to the target branch, even if some of the merged commits' messages or descriptions contain
[skip ci]
(or any of its variants).
However, your pipeline should not reproduce the behavior. Based on your current pipeline YAML definition, which includes trigger: none
, all CI triggers on the master
branch should already be disabled. This means that the pipeline should not be triggered by any commit pushed to master
, no matter it is a merge commit or a direct push.
The only way it would trigger is if the YAML definition from the master
branch explicitly includes trigger: - master
, as shown in the above image.
To further investigate, please verify:
- Whether the YAML trigger definition is being extracted from the
.yml
file in themaster
branch. - Whether the YAML trigger settings have been overridden by UI settings.
本文标签: azurePull request NOCIskip ci not workingStack Overflow
版权声明:本文标题:azure - Pull request NO_CI, [skip ci] not working - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744517242a2610236.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
Individual CI
triggered by the PR merge commit notPR automated
by the PR build validation? Is the pipeline YAML definition file that containstrigger: none
to disable all CI triggers from themaster
branch or any other branch? Is the Git repo provider Azure Repos or other services like GitHub? – Alvin Zhao - MSFT Commented Mar 18 at 9:18