[gvfs/wip/oholy/google-shared-drives-support: 2/4] ci: Use Buildah instead of Docker to generate images
- From: Ondrej Holy <oholy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gvfs/wip/oholy/google-shared-drives-support: 2/4] ci: Use Buildah instead of Docker to generate images
- Date: Fri, 12 Feb 2021 12:19:45 +0000 (UTC)
commit 7f24d1fe05e5bc19cf70abd563aa6464ff75ce85
Author: Ondrej Holy <oholy redhat com>
Date: Fri Feb 12 12:29:47 2021 +0100
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.
.gitlab-ci.yml | 26 +++++++++++++++-----------
1 file changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 807ead66..a7ffbba6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,7 @@
fedora:
- image: registry.gitlab.gnome.org/gnome/gvfs:latest
+ image:
+ name: registry.gitlab.gnome.org/gnome/gvfs:latest
+ entrypoint: ["/bin/sh", "-c"]
tags:
- x86_64
script:
@@ -10,18 +12,20 @@ fedora:
update-image:
variables:
- DOCKER_TLS_CERTDIR: ""
- image: docker:latest
- tags:
- - privileged
- services:
- - docker:dind
+ STORAGE_DRIVER: vfs
+ BUILDAH_FORMAT: docker
+ BUILDAH_ISOLATION: chroot
+ image: registry.fedoraproject.org/fedora:33
script:
- - docker build --tag $CI_REGISTRY_IMAGE .gitlab-ci/
- - 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-ci/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:
variables:
- $CI_PROJECT_NAMESPACE == "GNOME"
+
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]