Excluding or Including Branches for CloudBees CodeShip
You may have read our recent blog about the time we occasionally take - and just recently did again - for our team to work on any small items they’d like. If not, we recommend giving it a quick read.
One of the items we released that week was the ability to include, or exclude, branches for your builds.
Configuring your branches
If you navigate to your Project Settings screen, you’ll find a new tab labeled Branches.
On this tab, you can select either:
Don’t run builds for these branches, or
Run builds for these branches only.
Don’t run builds for these branches
Any branches you list here will be automatically ignored and will no longer trigger any builds. Note that this takes exact branch matches only.
Run builds for these branches only
If you’d like to get really narrow and explicit for when to run your continuous integration/continuous delivery (CI/CD) process, you can use this option. We will only trigger builds for the branches you list here. Again, though, note that this takes exact branch matches only - so this option is most useful during phases of reconfiguration and will be difficult to manage production CI/CD with.
The CloudBees CodeShip Pro “exclude” option
If you’re a CloudBees CodeShip Pro user, you may be familiar with the “exclude” key that you can use in your codeship-steps.yml file.
If you’re using this option, it’s important to note that this will be overridden by the new “exclude branches” feature. The “exclude” steps option happens within a build and allows for dynamic step configurations, whereas the “exclude branches” option stops the build from running altogether.
Hopefully, this feature helps you run your CI/CD process more efficiently, avoiding errant builds during reconfiguration phases or setting new projects up without running builds guaranteed to fail.
If you have any questions, just get in touch and you can always reference this feature in on our documentation as well.
Stay up to date
We'll never share your email address and you can opt out at any time, we promise.