summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorOndrej Holy <oholy@redhat.com>2020-11-19 10:21:15 +0100
committerOndrej Holy <oholy@redhat.com>2020-11-20 09:38:24 +0100
commitc90d787e1f4efd4e23acbf8748bf768a42f20206 (patch)
tree4c27809369b530dfadf0f06ab5f944a6a1140eaa /.gitlab-ci.yml
parent4e43e9efcab6c3abfa24fbd6fe77d326358c1999 (diff)
downloadnautilus-c90d787e1f4efd4e23acbf8748bf768a42f20206.tar.gz
ci: Use Buildah instead of Docker to generate images
The GNOME runners are no more privileged and thus it is not possible to use Docker from the pipeline. Let's use Buildah instead Docker to fix the image generation.
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml25
1 files changed, 14 insertions, 11 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 24a397f64..8fdd4ee68 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -26,7 +26,9 @@ nightly:
- 'flatpak devel'
fedora rawhide:
- image: registry.gitlab.gnome.org/gnome/nautilus:latest
+ image:
+ name: registry.gitlab.gnome.org/gnome/nautilus:latest
+ entrypoint: ["/bin/sh", "-c"]
stage: cross environment
script:
- meson _build .
@@ -88,18 +90,19 @@ style check:
update image:
variables:
- DOCKER_TLS_CERTDIR: ""
- image: docker:latest
+ STORAGE_DRIVER: vfs
+ BUILDAH_FORMAT: docker
+ BUILDAH_ISOLATION: chroot
+ image: registry.fedoraproject.org/fedora:33
stage: image
- tags:
- - privileged
- services:
- - docker:dind
script:
- - docker build --tag $CI_REGISTRY_IMAGE .gitlab/
- - docker tag $CI_REGISTRY_IMAGE "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
- - docker login $CI_REGISTRY -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD
- - docker push $CI_REGISTRY_IMAGE
+ - dnf install -y buildah runc
+ - sed -i '/^mountopt =.*/d' /etc/containers/storage.conf
+ - buildah bud --tag $CI_REGISTRY_IMAGE -f .gitlab/Dockerfile
+ - buildah tag $CI_REGISTRY_IMAGE "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
+ - buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
+ - buildah push $CI_REGISTRY_IMAGE
+ - buildah push "$CI_REGISTRY_IMAGE:v$CI_JOB_ID"
when: manual
only:
- web