Azure-pipelines-agent: "skip ci" in commit message not working

Created on 10 Sep 2019  路  13Comments  路  Source: microsoft/azure-pipelines-agent

I am trying to find a way to skip Azure CI via the commit message, when trying the following messages none of them really do the work and skip the CI run:
[skip ci] or [ci skip]
skip-checks: true or skip-checks:true
[skip azurepipelines] or [azurepipelines skip]
[skip azpipelines] or [azpipelines skip]
[skip azp] or [azp skip]
NO_CI

Most helpful comment

Until we have a proper fix in place, here is a temporary fix that will skip the script execution if the commit message (Build.SourceVersionMessage) contains skip ci. Using a variable if the condition is repeated for more scripts.

variables:
    SKIP_CI_FILTER: 'skip ci'

steps:
  - script: sh ./script1.sh
    condition: not(contains(variables['Build.SourceVersionMessage'], variables['SKIP_CI_FILTER']))

All 13 comments

For on-prem server, try this: ***NO_CI***
(include the asterisks)

The others might only work for Azure DevOps Services (the hosted version), they don't show up in the docs when I switch the filter to "Azure DevOps Server 2019" (https://docs.microsoft.com/en-us/azure/devops/pipelines/build/triggers?view=azure-devops-2019)

I am having the same issue, and from what I have read in #858 placing [skip ci] in a commit message only skips on merge to master and not in a PR run, which is totally bizarro!

***NO_CI*** is not working too

Until we have a proper fix in place, here is a temporary fix that will skip the script execution if the commit message (Build.SourceVersionMessage) contains skip ci. Using a variable if the condition is repeated for more scripts.

variables:
    SKIP_CI_FILTER: 'skip ci'

steps:
  - script: sh ./script1.sh
    condition: not(contains(variables['Build.SourceVersionMessage'], variables['SKIP_CI_FILTER']))

@vtbassmatt - Do you have any context here? Is this our recommended solution?

I believe we honor SKIP_CI and friends only when the commit containing that value is the tip, whether it's CI or PR. If you merge using GitHub's PR experience, for example, I don't think the SKIP_CI indicator gets included in the merge commit unless you included it in the PR message body.

@vtbassmatt
Are there any plans to add a possibility to skip PR triggering with [skip ci] comments?

I believe that should also work (as long as the [skip ci] is in the head commit of the push).

@vtbassmatt it does not work. See this build, the head commit of which is https://github.com/TileDB-Inc/TileDB-Py/commit/68d937f31b761a2655e04142d503896a7c3e939d.

Hmm, that sounds like a bug in the service then. Could you please file a report on Developer Community?

I'm going to close this issue because the bug can't be in the agent. (The agent just runs what the service tells it to run.)

That issue has been routed to a developer to investigate. Thanks for your patience.

Is this being fixed?

Was this page helpful?
0 / 5 - 0 ratings