ci: use buildah image directly

This commit is contained in:
naskya 2024-05-18 20:43:58 +09:00
parent 1c0d2e43b4
commit 3a7c5fcdbb
No known key found for this signature in database
GPG key ID: 712D413B3A9FED5C

View file

@ -157,7 +157,7 @@ test:build:client_only:
build:container: build:container:
stage: build stage: build
image: docker.io/debian:bookworm-slim image: quay.io/buildah/stable:latest
services: [] services: []
rules: rules:
- if: $BUILD == 'false' - if: $BUILD == 'false'
@ -181,11 +181,10 @@ build:container:
optional: true optional: true
- job: test:build:client_only - job: test:build:client_only
optional: true optional: true
variables:
STORAGE_DRIVER: vfs
before_script: before_script:
- apt-get update && apt-get -y upgrade - buildah version
- apt-get install -y --no-install-recommends ca-certificates fuse-overlayfs
- echo 'deb https://deb.debian.org/debian trixie main' | tee /etc/apt/sources.list
- apt-get update && apt-get install -y --no-install-recommends --target-release trixie buildah
- buildah prune --all --force || true - buildah prune --all --force || true
- echo "${CI_REGISTRY_PASSWORD}" | buildah login --username "${CI_REGISTRY_USER}" --password-stdin "${CI_REGISTRY}" - echo "${CI_REGISTRY_PASSWORD}" | buildah login --username "${CI_REGISTRY_USER}" --password-stdin "${CI_REGISTRY}"
- export IMAGE_TAG="${CI_REGISTRY}/${CI_PROJECT_PATH}/develop:not-for-production" - export IMAGE_TAG="${CI_REGISTRY}/${CI_PROJECT_PATH}/develop:not-for-production"
@ -193,11 +192,6 @@ build:container:
script: script:
- |- - |-
buildah build \ buildah build \
--isolation chroot \
--device /dev/fuse:rw \
--security-opt seccomp=unconfined \
--security-opt apparmor=unconfined \
--cap-add all \
--platform linux/amd64 \ --platform linux/amd64 \
--layers \ --layers \
--cache-to "${IMAGE_CACHE}" \ --cache-to "${IMAGE_CACHE}" \