Introducing Auto-Skip for Even Faster Builds

4 minute read     Updated:

Gavin Johnson %
Gavin Johnson

Earthly and Earthly Cloud have a lot of benefits and useful features, but there are three areas where we feel that, if we knock it out of the park, developers will love our tools, and we will succeed as a business.

  1. Simplicity. If Earthly is easy to use, then the barrier to entry is lower and developers will be more likely to use it. Our syntax being a very familiar mixture of Dockerfile and Makefile makes Earthly easy to use. The fact that we work with every language, framework, and build tool also makes it easy to use. So does the fact that it works with any CI. The less you have to think about and research how to use or implement Earthly, the better.
  2. Consistency (or Repeatability). Since Earthly containerizes builds, they can run anywhere Docker can run. So if it runs correctly on your computer, you know that it will run correctly on your colleagues’ computers, and you know it will run correctly in CI. With Earthly, builds are self-contained, isolated, consistent, and portable. This makes build failures across teams due to differing build environments a thing of the past. It also means you can easily reproduce and debug CI failures locally instead of having to commit and push changes to your repo over and over again just to test CI.
  3. Speed. Builds are consistently slower than they should be. Every time a build runs, the same commands execute, even ones where the results of execution are no different than the last time the build ran. Installing dependencies is a great example. Every time a build runs it installs dependencies, but those dependencies change infrequently. So that’s a waste of time. Some CI tools have caching so these superfluous steps can be skipped, but even those solutions are slower than they should be. Since CI runners are almost always ephemeral, they have to download the cache at the beginning of every build and upload it at the end of every build. Even if no steps in the build need to run, this download and upload have to happen. That’s a waste of time too. Earthly gives you automatic caching so superfluous steps are skipped, and Earthly Satellites aren’t ephemeral, so no cache download and upload is necessary.

This announcement is related to that third area, speed. We’re excited to announce an augmentation to our already stellar caching options. A new layer of caching that makes builds run even faster. We’re introducing Auto-Skip.

What Is Auto-Skip

What

Auto-Skip allows Earthly to skip large parts of a build in certain situations and is especially useful in monorepo setups, where you are building multiple projects at once, and only one of them has changed. It is a global cache stored in a cloud database that is only available to users of Earthly Cloud.

Auto-Skip is an all-or-nothing type of cache. Either the entire target is skipped, or none of it is. This is because Auto-Skip doesn’t know which parts of the target have changed. Instead, it traverses the full Earthly target graph and creates a cache key using a hash of all the graph’s values and files. If the cache key matches the last run, it skips the target. If the cache keys don’t match, Earthly will fallback to the other forms of caching, layer-based caching and cache mounts, to run the build as efficiently as possible.

Unlike layer caching, Auto-Skip can skip RUN --no-cache and RUN --push commands. This can be useful in situations when you would like to skip a deployment if nothing has changed.

Note that Auto-Skip is still in beta, so details about it may change slightly, but it is being used without issue by several happy customers as well as in our own repos.

How to Use Auto-Skip

Auto-Skip is very easy to use. You have to have an Earthly Cloud account and be authenticated in Earthly to use Auto-Skip. There are two ways to invoke Auto-Skip:

  1. Auto-Skip can be activated for an entire run by using earthly --auto-skip in the CLI.
  2. Auto-Skip can be activated for individual targets by using BUILD --auto-skip in your Earthfile.

Visit our docs from more information and details about using Auto-Skip

Sign Up for Earthly Cloud and Start Using Auto-Skip Today

How

Sign up for Earthly Cloud to start using Auto-Skip. It’s available to all Earthly Cloud users. Try it out, and let us know how it works for you.

Earthly Cloud: Consistent, Fast Builds, Any CI
Consistent, repeatable builds across all environments. Advanced caching for faster builds. Easy integration with any CI. 6,000 build minutes per month included.

Get Started Free

Gavin Johnson %
Gavin is the director of product & marketing at Earthly. He's an ex-PMM at a bunch of tech co's, an ex-consultant at Deloitte, an ex-sys admin, and (sometimes) ex-developer. He's also a Brazilian jiu jitsu black belt and dog dad to a Siberian Husky.
@gavinjtech
✉Email Gavin✉

Published:

Get notified about new articles!
We won't send you spam. Unsubscribe at any time.