GitLab CI/CD
This example uses GitLab CI/CD to build the EarthBuild target +build.
# .gitlab-ci.yml
services:
- docker:dind
variables:
DOCKER_HOST: tcp://docker:2375
FORCE_COLOR: 1
EARTH_EXEC_CMD: "/bin/sh"
image: earthbuild/earthbuild:v0.8.19
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
earth:
stage: build
script:
- earth --ci --push -P +buildNote that in this particular configuration, the earthbuild/earthbuild image will first start BuildKit under the same container via the image's entrypoint script; however by setting EARTH_EXEC_CMD=/bin/sh, the /usr/bin/earth-entrypoint.sh script will present a shell rather than call the earth binary. This bootstrapping occurs before the before_script portion of the gitlab job executes.
In order to configure a registry mirror, users will need to configure a multi-line string for EARTH_ADDITIONAL_BUILDKIT_CONFIG under the variables section. For example:
A full example is available on GitLab.
For a complete guide on CI integration see the CI integration guide.
Last updated