Skip / do-not-run mechanism for pipelines

Issue #13598 resolved
Ben Buchanan created an issue

Sometimes I just need to park some code and don't want CI to run and use up minutes.

Currently the only way to manage that is to find a positive match for all branches I do want to run (I can't see a documented way to exclude a pattern).

I could do a positive match for the negative case (heh) for something like "donotmerge*" but even so, the build would show as green/successful rather than skipped (which is obviously risky).

So basically I'm looking for a way to tell Pipelines NOT to run for a particular branch or pattern; and I don't want Pipelines to show a "successful" build for that scenario. I do want some visibility of skipped builds as there's potential for people to over-use it - just as Bamboo shows skipped or stopped builds.

Comments (7)

  1. Joshua Tjhin Account Deactivated

    Hey Ben,

    Can you give a few examples of which patterns you want to exclude and which patterns you do want to build on push?

    While not done at a branch level, you can also include [skip ci] or [ci skip] anywhere in the commit message and Pipelines won't build the commit on push.

  2. Ben Buchanan reporter

    Hi @xtjhin, hadn't seen the commit message option :)

    Patterns I was thinking: donotmerge*, strangely enough skipci* and skippipelines* would also work. Also nobuild, nopipelines etc would make sense. A way to avoid needing to come up with a specific list would be to have a command for the yml file:

          - skip: true

    I like donotmerge* because it suits my particular workflow, but if the skip was a command people could define whatever they want.

  3. Joshua Tjhin Account Deactivated

    So the way branches can be configured is an inclusive model. Given our current roadmap, it is unlikely that we add branch exclusions in the next 6 months.

    However, one way that might not be clear is that the default pipeline is optional. It is a fallback if there are no branch pipelines defined. If you have a branch naming convention, you can just configure just the branches you would like to run.


          - step:
                - echo "only on master"
          - step:
                - echo "only on feature branches"
  4. Matt Ryall

    Ben, would Josh's suggestion above work for you? That is, removing the default configuration and just configuring it for the branches you need CI on.

    I'll tentatively close this since last comms were a few months ago. Feel free to comment if you think it should be reopened.

  5. Ben Buchanan reporter

    Yeah the workarounds are enough to get by. Would still love to see exclude patterns for branches; and a skip task; but consider those long-term feature requests :)

  6. Log in to comment