For almost two years, our Support and Customer Success teams have been helping users get the most out of the CircleCI platform. In that time we’ve seen a lot of users struggle with the same obstacles, most of which can be resolved through little-known, life-saving features. Here are the top 5 CircleCI features that can help you save time, increase control, and get back to green faster.
Auto-cancel redundant builds on GitHub
What it is: Automatically cancel any queued or running builds on a branch (except on your default branch) when a newer build is triggered on that same branch.
Why you need it: Why wait for a build to finish if you’ve already improved on it? Automatically skip redundant builds with this feature and save your bandwidth for the most up-to-date builds. Note: This feature only applies to builds triggered by pushes to GitHub.
How to get it: To enable this feature you can navigate to “Advanced Settings” for your project and enable the “Auto-cancel redundant builds” option.
PR-only build feature
What it is: Only run builds when a pull request is open.
Why you need it: By only building when a pull request is submitted, you eliminate building every time a branch is modified. This can let users better manage their queues.
How to get it: To enable this functionality you can navigate to “Advanced Settings” for your project and enable the “Only build pull requests” option.
What it is: Automatically split and balance your tests across multiple containers to reduce your overall build time. For more information on how we auto-balance your tests, see here.
Why you need it: Parallelism speeds up test and build run times, letting you get faster feedback.
How to get it: Sign into CircleCI. On your dashboard you’ll find a list of all the projects currently building on CircleCI. Click on the gear icon next to the project you’d like to parallelize, then click “Adjust Parallelism.” From there, you can choose the number of parallel containers you want to use for that repo. Repeat the process for your other repos. Each of your repos can be set to a different level of parallelization for maximum optimization.
Additional Admin-only Permissions
What it is: Prohibit non-admins from modifying critical project settings.
Why you need it: CircleCI mirrors permissions from GitHub, allowing only admins to make critical changes to your subscription, credit card information, etc. Take Admin-only permissions one step further and you can ensure that only the accounts who should be making changes to project settings (like parallelism, build environment, and envars) are authorized to do so. Note: This feature can be applied on the organization or project level and does not block users from the following features: debug via ssh, rebuild, rebuild with ssh, rebuild without cache.
How to get it: Create a support request in the app and ask for Admin-only Project Settings Permissions. Be sure to include the (case sensitive) org name or list of repos to be enabled.
SSH into running builds
What it is: Your container persists for 30 minutes while you securely troubleshoot irregularities.
Why you need it: SSH into a running build to look at log files, processes running, and so on to troubleshoot more quickly.
How to get it: To enable SSH access for a running build, go to the ‘Debug via SSH’ tab and click the ‘Enable SSH for this build’ button. See here for more details or to enable SSH on a new build.
Bonus: Why is ‘bundle install’ failing?
In recent weeks, several CircleCI users have noted that
bundle install fails on their builds.
This is often due to a Bundler 1.14.0 (released on January 20) which auto-upgrades unless you pin the previous versions. 1.14.x versions of Bundler are broken. We recommend you pin a stable version of Bundler (1.13.x) before running ‘bundle install’ to avoid failures.