LogoLogo
HomeBlogGitHubGet Started FreeLogin
Earthly 0.7
Earthly 0.7
  • 👋Introduction
  • 💻Install Earthly
  • 🎓Learn the basics
    • Part 1: A simple Earthfile
    • Part 2: Outputs
    • Part 3: Adding dependencies With Caching
    • Part 4: Args
    • Part 5: Importing
    • Part 6: Using Docker In Earthly
    • Part 7: Using remote runners
    • Part 8a: Using Earthly in your current CI
    • Final words
  • ⭐Featured guides
    • Rust
  • 📖Docs
    • Guides
      • Importing
      • Build arguments and secrets
      • Functions
      • Using Docker in Earthly
      • Multi-platform builds
      • Authenticating Git and image registries
      • Integration Testing
      • Debugging techniques
      • Podman
      • Configuring registries
        • AWS ECR
        • GCP Artifact Registry
        • Azure ACR
        • Self-signed certificates
      • Using the Earthly Docker Images
        • earthly/earthly
        • earthly/buildkitd
      • ✅Best practices
    • Caching
      • Caching in Earthfiles
      • Managing cache
      • Caching via remote runners
      • Caching via a registry (advanced)
    • Remote runners
    • Earthfile reference
      • Builtin args
      • Excluding patterns
      • Version-specific features
    • The earthly command
    • Earthly lib
    • Configuration reference
    • Examples
    • Misc
      • Alternative installation
      • Data collection
      • Definitions
      • Public key authentication
  • 🔧CI Integration
    • Overview
    • Use the Earthly CI Image
    • Build your own Earthly CI Image
    • Pull-Through Cache
    • Remote BuildKit
    • Vendor-Specific Guides
      • Jenkins
      • Circle CI
      • GitHub Actions
      • AWS CodeBuild
      • Kubernetes
      • Google Cloud Build
      • GitLab CI/CD
      • Woodpecker CI
      • Bitbucket Pipelines
  • ☁️ Earthly Cloud
    • Overview
    • Managing permissions
    • Cloud secrets
    • Earthly Satellites
      • Managing Satellites
      • Using Satellites
Powered by GitBook
On this page
  • Examples of CI integration
  • Examples by dev environments
  • Example Earthfiles
  • Examples from the Basics tutorial
  • Examples by language
  • Examples by use-cases
  • Examples by Earthly features
  • Examples by use of other technologies
  • Other
  • Larger Examples And Community Examples
  • Earthly's own build

Was this helpful?

Edit on GitHub
  1. Docs

Examples

PreviousConfiguration referenceNextMisc

Last updated 1 year ago

Was this helpful?

Examples of CI integration

Examples of integrating Earthly into various CI systems can be found on the following pages:

For more general information on CI systems not listed above, see the .

Examples by dev environments

Examples of how Earthly can be integrated into different dev environments

  • - shows how Earthly can be used in GitHub Codespaces and Devcontainers

Example Earthfiles

In this section, you will find some examples of Earthfiles to familiarize yourself with Earthly.

The code for all the examples is available in the .

Examples from the Basics tutorial

Examples by language

Examples by use-cases

Examples by Earthly features

Examples by use of other technologies

Other

Larger Examples And Community Examples

Earthly's own build

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

earthly +all

If you are new to Earthly, you may find the helpful.

Please note that these examples, although similar, are distinct from the ones used in the .

- shows how WITH DOCKER and docker-compose can be used to start up services and then run an integration test suite.

- shows how multiple sub-projects can be co-located in a single repository and how the build can be fragmented across these.

- shows how artifacts from multiple repositories can be referenced in a single build. See also the grpc example for a more extensive use-case.

- shows how to use the IMPORT command to alias Earthfile references.

- 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.

- shows how Earthly can execute builds and create images for multiple platforms, using QEMU emulation.

- shows has through the use of cross-compilation, you can create images for multiple platforms, without using QEMU emulation.

- shows how to use Earthly to compile a protobuf grpc definition into protobuf code for both a Go-based server, and a python-based client, in a multirepo setup.

- shows how Terraform could be used from Earthly.

- some sample code we used in our README.

- a suite of tests Earthly uses to ensure that its features are working correctly.

- the root build file

- the build of the Buildkit daemon

- the build of the parser, which generates .go files

- system and smoke tests

- the build of the VS Code extension

📖
Circle CI
GitHub Actions
AWS CodeBuild
Jenkins
Kubernetes
CI integration guide
GitHub Codespaces
examples GitHub directory
Basics tutorial
tutorial
go
js
java
python
tutorial
c
clojure
cobol
cpp
dotnet
elixir
go
java
js
python
ruby
ruby-on-rails
rust
scala
typescript-node
integration-test
monorepo
multirepo
import
cutoff-optimization
multiplatform
multiplatform-cross-compile
grpc
terraform
readme
tests
Earthly, Rust, GoLang, NodeJS and GitHub Actions Example
Cloud Services In GoLang
Earthfile workshop Repo
Python & C Example
Python Docker Example
Awesome Earthly - Community Examples
Earthfile
buildkitd/Earthfile
AST/parser/Earthfile
tests/Earthfile
earthfile-grammar/Earthfile