Examples of integrating Earthly into various CI systems can be found on the following pages:
In this section, you will find some examples of Earthfiles to familiarize yourself with Earthly.
- integration-test - shows how
docker-composecan be used to start up services and then run an integration test suite.
- monorepo - shows how multiple sub-projects can be co-located in a single repository and how the build can be fragmented across these.
- multirepo - shows how artifacts from multiple repositories can be referenced in a single build. See also the
grpcexample for a more extensive use-case.
- cutoff-optimization - shows that if an intermediate artifact does not change, then the rest of the build will use the cache, even if the source has changed.
- multiplatform - shows how Earthly can execute builds and create images for multiple platforms, using QEMU emulation.
- multiplatform-cross-compile - shows has through the use of cross-compilation, you can create images for multiple platforms, without using QEMU emulation.
As a distinct example of a complete build, you can take a look at Earthly's own build. Earthly builds itself, and the build files are available on GitHub:
To invoke Earthly's build, check out the code and then run the following in the root of the repository