Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"skip ci" in commit message not working #2441

Closed
BoazWarshawsky opened this issue Sep 10, 2019 · 15 comments
Closed

"skip ci" in commit message not working #2441

BoazWarshawsky opened this issue Sep 10, 2019 · 15 comments
Assignees

Comments

@BoazWarshawsky
Copy link

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

@DotNetSparky
Copy link

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)

@petong
Copy link

petong commented Oct 9, 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!

@BoazWarshawsky
Copy link
Author

***NO_CI*** is not working too

@jeliasson
Copy link

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

@jtpetty
Copy link
Contributor

jtpetty commented Jan 27, 2020

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

@vtbassmatt
Copy link
Member

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.

@artemry-nv
Copy link

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

@vtbassmatt
Copy link
Member

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

@ihnorton
Copy link

@vtbassmatt it does not work. See this build, the head commit of which is TileDB-Inc/TileDB-Py@68d937f.

@vtbassmatt
Copy link
Member

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.)

@ihnorton
Copy link

https://developercommunity.visualstudio.com/content/problem/714477/pr-commit-with-skip-ci-in-message-still-triggers-a.html

@vtbassmatt
Copy link
Member

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

@Vic152
Copy link

Vic152 commented Nov 19, 2020

Is this being fixed?

@alvindutt
Copy link

Hi All

Is this still an issue on PR triggers?

@PaulTaykalo
Copy link

This is not about commit-based, but rather PR based, still


# Variable that checks if the PR title contains '[skip ci]' or '[skip build]'
variables:
  - name: should_skip_ci
    value: |
      or(contains(variables['System.PullRequest.PullRequestTitle'], '[skip ci]'), contains(variables['System.PullRequest.PullRequestTitle'], '[skip build]'))

stages:

  # Stage for checking if CI should be skipped
  # Then we can skip the rest of the CI pipeline by adding dependsOn: check_skip_ci 
  - stage: check_skip_ci
    displayName: Check if CI should be skipped
    condition: not(variables['should_skip_ci'])
    jobs:
      - job: check_skip_ci
        displayName: Check if CI should be skipped
        steps:
          - script: echo "This is a dummy job to check if CI should be skipped. Since Azure doesnt allow empty stages without jobs"

  - stage: build
    dependsOn: check_skip_ci

  ## OR
  - stage: build
    condition: and(succeeded(), not(variables['should_skip_ci']))
               

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests