Add command in commit message to ignore building commit in Pipelines (skip ci)

Issue #13004 resolved
Dmitry Obraztsov created an issue

Add support for keyword in commit message.

For example: PPLN_IGNORE. Commit message... Command for pipeline to ignore this commit.

Or maybe add more flexibility and send any arguments from commit message to control flow of deploy/build scripts.

For example: PPLN_SMITH. Commit message... Extract custom arguments 'SMITH' and assign it to environment variable. Deploy scripts use this variable and deploy this build only for Smith.

Comments (15)

  1. Steven Vaccarella staff

    This sounds like a potentially useful feature and we'll be sure to keep an eye on this issue to see how many other people would find it useful.

    In the meantime, have you considered using branches rather than commit messages to control whether and how your pipeline runs? Pipelines already has support for customising your pipeline for each branch, so you might find that you can change your workflow slightly so that instead of using a special commit message to avoid executing the pipeline you commit to a special branch to avoid executing the pipeline.

  2. Dmitry Obraztsov reporter

    Yes, i'm using branch specific pipelines, but the idea of control commands suggest additional control flow (build flow) behaviour. I'm considered processing commit message (like PPLN_IGNORE) in built-in pipeline engine. For example: two coders create new view (form) one complete markup and commit it (with PPLN_IGNORE), second realize controllers code and commit, after this pipeline build app and send to design review. Perhaps this is a highly simplified example. Very often, the commit messages includes special commands that are handled by hooks.

  3. Benj Kamm

    Another use case for something like PPLN_IGNORE is making a quick documentation-only fix -- doesn't necessarily need all the tests to run etc.

  4. Wilfred van der Deijl

    We have something similar; the build pipeline for master kicks in when we push to master. This is a javascript project and the build does an npm version patch to increase the version number and pushes this change to git. This triggers another build so we end up in an endless loop. We would like to ignore the commits from the build pipeline itself and not trigger another build

  5. Davina Adisusila staff

    Hi everyone,

    We've just added support for this into Bitbucket Pipelines! Just include [skip ci] or [ci skip] anywhere in the commit message of your HEAD commit, and it will not run a build. Any commits that include this will be ignored by Pipelines.

    Thanks, Davina

  6. Thomas Turrell-Croft

    Great thank you Atlasssian.

    The maven release plugin allows configurable commit messages however I wonder if all release tools are so flexible.

    Ideally I would be able to define the commit message to ignore from the pipelines settings file.

  7. Tom Bunting

    Works great, really needed this in conjunction with maven release plugin, which we're using to commit back tags and POM updates to the repo. By overriding the scm comment prefix for the plugin to include [skip ci], the buid is not re-triggered.

  8. Log in to comment