[PATCH v2 1/5] CI: create own base buildah image instead of wayland's
Andrzej Hajda
andrzej.hajda at intel.com
Wed Jun 11 11:06:36 UTC 2025
To allow to bump debian and fedora versions for build testing we need
reliable base container. Containers provided by
registry.freedesktop.org/wayland/ci-templates/buildah are quite old and
have multiple issues when used with newer OS versions.
Instead of relying on them or some other random registry let's take
bare buildah from reliable source and add required tools to it.
Base image will be built only if Dockerfile.build-buildah
is changed. Alternatively building can be enforced from gitlab:
https://gitlab.freedesktop.org/drm/igt-gpu-tools/-/pipelines.
Signed-off-by: Andrzej Hajda <andrzej.hajda at intel.com>
---
.gitlab-ci.yml | 32 +++++++++++++++++++++++++++-----
Dockerfile.build-buildah | 3 +++
2 files changed, 30 insertions(+), 5 deletions(-)
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1aff5cb000555bb3995634d814c7074488e2567e..ab6968b549d0026869fe38f063f60f57b5e9d75c 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ image: $CI_REGISTRY/$CI_PROJECT_PATH/build-fedora:commit-$CI_COMMIT_SHA
variables:
BUILDAH_FORMAT: docker
BUILDAH_ISOLATION: chroot
+ BUILD_CONTAINERS_IMAGE: $CI_REGISTRY/$CI_PROJECT_PATH/build-buildah:latest
MESON_OPTIONS: >
-Dlibdrm_drivers=intel,nouveau,amdgpu
-Doverlay=enabled
@@ -14,17 +15,38 @@ variables:
LANG: "C.UTF-8"
stages:
+ - build-base
- build-containers
- build
- test
- containers
- deploy
+############### BUILD BASE CONTAINER #####################
+
+build-base:build-buildah:
+ stage: build-base
+ image: quay.io/buildah/stable
+ rules:
+ - if: $CI_PIPELINE_SOURCE == "push"
+ changes:
+ - Dockerfile.build-buildah
+ script:
+ - buildah bud --squash -t $BUILD_CONTAINERS_IMAGE -f Dockerfile.build-buildah .
+ - buildah push --creds $CI_REGISTRY_USER:$CI_REGISTRY_PASSWORD $BUILD_CONTAINERS_IMAGE docker://$BUILD_CONTAINERS_IMAGE
+
+build-base:build-buildah-manual:
+ extends: build-base:build-buildah
+ when: manual
+ rules:
+ - when: manual
+ - allow_failure: true
+
################# BUILD CONTAINERS #######################
build-containers:build-debian:
stage: build-containers
- image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0
+ image: $BUILD_CONTAINERS_IMAGE
script:
- 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
@@ -32,21 +54,21 @@ build-containers:build-debian:
build-containers:build-debian-armhf:
stage: build-containers
- image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0
+ image: $BUILD_CONTAINERS_IMAGE
script:
- 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: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0
+ image: $BUILD_CONTAINERS_IMAGE
script:
- 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-fedora:
stage: build-containers
- image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0
+ image: $BUILD_CONTAINERS_IMAGE
script:
- podman login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- .gitlab-ci/pull-or-rebuild.sh base Dockerfile.build-fedora build-fedora
@@ -235,7 +257,7 @@ pages:
containers:igt:
stage: containers
- image: registry.freedesktop.org/wayland/ci-templates/buildah:2019-08-13.0
+ image: $BUILD_CONTAINERS_IMAGE
dependencies:
- build:tests-fedora
variables:
diff --git a/Dockerfile.build-buildah b/Dockerfile.build-buildah
new file mode 100644
index 0000000000000000000000000000000000000000..94623c2ef50aca330decddf75a1104c539904610
--- /dev/null
+++ b/Dockerfile.build-buildah
@@ -0,0 +1,3 @@
+FROM quay.io/buildah/stable
+
+RUN dnf install -y podman skopeo
--
2.43.0
More information about the igt-dev
mailing list