How to skip build when merging a small change to main branch in Azure DevOps?

Vivian Glen 20 Reputation points
2025-04-23T21:06:19.79+00:00

A feature branch is ready for merging into the main branch, but the change is minimal (just a documentation update and two lines added in azure-pipeline.yml). Is there a way to skip the build pipeline when creating a pull request for this merge?

Azure DevOps
{count} votes

1 answer

Sort by: Most helpful
  1. Divyesh Govaerdhanan 4,515 Reputation points
    2025-04-23T22:13:27.0733333+00:00

    Hello,

    Welcome to Microsoft Q&A,

    You can also tell Azure Pipelines to skip running a pipeline that a push would normally trigger. Just include [skip ci] in the message or description of any of the commits that are part of a push, and Azure Pipelines will skip running CI for this push. You can also use any of the following variations.

    • [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***

    Consideration:

    1. The [skip ci] or [ci skip] keywords must be present in the most recent commit for the skip to take effect.
    2. This only works if the trigger in your azure-pipelines.yml includes something like:
    trigger:
      branches:
        include:
          - main
    

    And your PR is targeting that trigger branch (main, for example).

    https://learn.microsoft.com/en-us/azure/devops/pipelines/repos/azure-repos-git?view=azure-devops&tabs=yaml#skipping-ci-for-individual-pushes

    Please Upvote and Accept the answer if it helps!!


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.