GitLab CI/CD
This example uses GitLab CI/CD to build the Earthly target +build.
1
# .gitlab-ci.yml
2
​
3
image: docker
4
services:
5
- docker:dind
6
​
7
before_script:
8
- apk update && apk add git
9
- wget https://github.com/earthly/earthly/releases/download/v0.6.14/earthly-linux-amd64 -O /usr/local/bin/earthly
10
- chmod +x /usr/local/bin/earthly
11
- export FORCE_COLOR=1
12
- /usr/local/bin/earthly bootstrap
13
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
14
​
15
earthly:
16
stage: build
17
script:
18
- earthly --ci --push -P +build
Copied!
A full example is available on GitLab.
For a complete guide on CI integration see the CI integration guide.
Last modified 1mo ago
Copy link