mirror of
https://github.com/brl/mutter.git
synced 2024-11-24 00:50:42 -05:00
CI: add job to build the docker image
This defines a template for building docker images as well as a job to build the fedora image thats mean to replace the one that's currently used. Close #381
This commit is contained in:
parent
1dff74e71c
commit
2bc69242a8
@ -1,11 +1,45 @@
|
|||||||
image: registry.gitlab.gnome.org/gnome/mutter/master:v1
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
|
- docker-image
|
||||||
- build
|
- build
|
||||||
|
|
||||||
build-mutter:
|
build-mutter:
|
||||||
|
image: registry.gitlab.gnome.org/gnome/mutter/master:v1
|
||||||
stage: build
|
stage: build
|
||||||
script:
|
script:
|
||||||
- meson . build -Degl_device=true -Dwayland_eglstream=true
|
- meson . build -Degl_device=true -Dwayland_eglstream=true
|
||||||
- ninja -C build
|
- ninja -C build
|
||||||
- ninja -C build install
|
- ninja -C build install
|
||||||
|
|
||||||
|
.docker base:
|
||||||
|
image: 'docker:stable'
|
||||||
|
services:
|
||||||
|
- docker:dind
|
||||||
|
script:
|
||||||
|
- export IMAGE="${CI_REGISTRY_IMAGE}/${ARCH}/${TAG}"
|
||||||
|
- export REF="${IMAGE}:${CI_COMMIT_SHA}"
|
||||||
|
- export LATEST="${IMAGE}:latest"
|
||||||
|
|
||||||
|
- docker build --pull -t ${REF} ${CONTEXT_DIR}
|
||||||
|
- docker image tag ${REF} ${LATEST}
|
||||||
|
|
||||||
|
# Push the images
|
||||||
|
- |
|
||||||
|
if [ "$CI_COMMIT_REF_NAME" = "master" ]; then
|
||||||
|
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||||
|
docker push ${REF}
|
||||||
|
docker push ${LATEST}
|
||||||
|
fi
|
||||||
|
|
||||||
|
docker fedora amd64:
|
||||||
|
extends: '.docker base'
|
||||||
|
stage: 'docker-image'
|
||||||
|
variables:
|
||||||
|
# When using dind, it's wise to use the overlayfs driver for
|
||||||
|
# improved performance.
|
||||||
|
DOCKER_DRIVER: 'overlay2'
|
||||||
|
ARCH: 'amd64'
|
||||||
|
TAG: 'fedora'
|
||||||
|
CONTEXT_DIR: '.gitlab-ci/'
|
||||||
|
only:
|
||||||
|
changes:
|
||||||
|
- '.gitlab-ci/Dockerfile'
|
||||||
|
Loading…
Reference in New Issue
Block a user