summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml64
-rwxr-xr-x.gitlab-ci/pull-or-rebuild.sh20
2 files changed, 27 insertions, 57 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5b983618..07c9a628 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,7 @@
image: $CI_REGISTRY/$CI_PROJECT_PATH/build-fedora:commit-$CI_COMMIT_SHA
variables:
+ BUILDAH_FORMAT: docker
+ BUILDAH_ISOLATION: chroot
MESON_OPTIONS: >
-Dlibdrm_drivers=intel,nouveau,amdgpu
-Doverlay=enabled
@@ -22,65 +24,40 @@ stages:
build-containers:build-debian:
stage: build-containers
- image: docker:stable
- services:
- - docker:dind
- variables:
- DOCKER_HOST: tcp://docker:2375
- DOCKER_DRIVER: overlay2
+ image: registry.freedesktop.org/wayland/ci-templates/buildah
script:
- - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-minimal build-debian-minimal
- - docker pull $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-minimal:commit-$CI_COMMIT_SHA
- - docker tag $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-minimal:commit-$CI_COMMIT_SHA build-debian-minimal:commit-$CI_COMMIT_SHA
+ - podman pull $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-minimal:commit-$CI_COMMIT_SHA
+ - podman tag $CI_REGISTRY/$CI_PROJECT_PATH/build-debian-minimal:commit-$CI_COMMIT_SHA build-debian-minimal:commit-$CI_COMMIT_SHA
- .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian build-debian
build-containers:build-debian-armhf:
stage: build-containers
- image: docker:stable
- services:
- - docker:dind
- variables:
- DOCKER_HOST: tcp://docker:2375
- DOCKER_DRIVER: overlay2
+ image: registry.freedesktop.org/wayland/ci-templates/buildah
script:
- - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-armhf build-debian-armhf
build-containers:build-debian-arm64:
stage: build-containers
- image: docker:stable
- services:
- - docker:dind
- variables:
- DOCKER_HOST: tcp://docker:2375
- DOCKER_DRIVER: overlay2
+ image: registry.freedesktop.org/wayland/ci-templates/buildah
script:
- - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-arm64 build-debian-arm64
build-containers:build-debian-mips:
stage: build-containers
- image: docker:stable
- services:
- - docker:dind
- variables:
- DOCKER_HOST: tcp://docker:2375
- DOCKER_DRIVER: overlay2
+ image: registry.freedesktop.org/wayland/ci-templates/buildah
script:
- - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-debian-mips build-debian-mips
build-containers:build-fedora:
stage: build-containers
- image: docker:stable
- services:
- - docker:dind
- variables:
- DOCKER_HOST: tcp://docker:2375
- DOCKER_DRIVER: overlay2
+ image: registry.freedesktop.org/wayland/ci-templates/buildah
script:
- - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-fedora build-fedora
#################### BUILD #########################
@@ -280,20 +257,15 @@ pages:
############## CONTAINERS ####################
-
containers:igt:
stage: containers
- image: docker:stable
- services:
- - docker:dind
+ image: registry.freedesktop.org/wayland/ci-templates/buildah
dependencies:
- build:tests-fedora
variables:
- DOCKER_HOST: tcp://docker:2375
- DOCKER_DRIVER: overlay2
FORCE_REBUILD: 1
script:
- - docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- - docker pull $CI_REGISTRY/$CI_PROJECT_PATH/build-fedora:commit-$CI_COMMIT_SHA
- - docker tag $CI_REGISTRY/$CI_PROJECT_PATH/build-fedora:commit-$CI_COMMIT_SHA build-fedora:commit-$CI_COMMIT_SHA
+ - podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
+ - podman pull $CI_REGISTRY/$CI_PROJECT_PATH/build-fedora:commit-$CI_COMMIT_SHA
+ - podman tag $CI_REGISTRY/$CI_PROJECT_PATH/build-fedora:commit-$CI_COMMIT_SHA build-fedora:commit-$CI_COMMIT_SHA
- .gitlab-ci/pull-or-rebuild.sh igt Dockerfile igt
diff --git a/.gitlab-ci/pull-or-rebuild.sh b/.gitlab-ci/pull-or-rebuild.sh
index 3f00e831..3d71e821 100755
--- a/.gitlab-ci/pull-or-rebuild.sh
+++ b/.gitlab-ci/pull-or-rebuild.sh
@@ -36,28 +36,26 @@ COMMITNAME=$IMAGENAME:commit-$CI_COMMIT_SHA
if [ "$TYPE" = "base" ]; then
# base container (building, etc) - we rebuild only if changed or forced
- docker pull $DOCKERNAME
+ skopeo inspect docker://$DOCKERNAME
IMAGE_PRESENT=$?
set -e
if [ $IMAGE_PRESENT -eq 0 ] && [ ${FORCE_REBUILD:-0} -eq 0 ] ; then
echo "Skipping, already built"
- docker tag $DOCKERNAME $COMMITNAME
else
echo "Building!"
- docker build --build-arg=CI_COMMIT_SHA=$CI_COMMIT_SHA \
- -t $DOCKERNAME -t $COMMITNAME -f $DOCKERFILE .
- docker push $DOCKERNAME
- fi
- docker push $COMMITNAME
+ podman build --build-arg=CI_COMMIT_SHA=$CI_COMMIT_SHA -t $DOCKERNAME -f $DOCKERFILE .
+ podman push $DOCKERNAME
+ fi
+
+ skopeo copy docker://$DOCKERNAME docker://$COMMITNAME
elif [ "$TYPE" = "igt" ]; then
# container with IGT, we don't care about Dockerfile changes
# we always rebuild
set -e
- docker build --build-arg=CI_COMMIT_SHA=$CI_COMMIT_SHA \
- -t $REFNAME -t $COMMITNAME -f $DOCKERFILE .
- docker push $REFNAME
- docker push $COMMITNAME
+ podman build --build-arg=CI_COMMIT_SHA=$CI_COMMIT_SHA -t $COMMITNAME -f $DOCKERFILE .
+ podman push $COMMITNAME
+ skopeo copy docker://$COMMITNAME docker://$REFNAME
else
echo "unknown build type $TYPE"
exit 1