diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5c82de0..d25599d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,31 +3,21 @@ stages: - build variables: - IMAGE: ${CI_REGISTRY}/${CI_PROJECT_PATH}:${CI_COMMIT_SHA} - CONTAINERFILE: Containerfile - CONTEXT: . - EXTRA_ARGS: "" + PRIV_ARGS: "--security-opt=label=disable --cap-add=all --device /dev/fuse" .build-image: stage: build image: quay.io/buildah/stable:v1.38.0 needs: [] - script: buildah bud -f ${CONTAINERFILE} --no-cache -t ${IMAGE} ${EXTRA_ARGS} ${CONTEXT} - rules: - - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS && $CI_PIPELINE_SOURCE == "push" - when: never - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - - if: $CI_COMMIT_BRANCH && $CI_OPEN_MERGE_REQUESTS - when: never -build-image: +build-minimal: extends: .build-image - parallel: - matrix: - - TIER: [minimal, standard, tier-x] - variables: - EXTRA_ARGS: "--security-opt=label=disable --cap-add=all --build-arg MANIFEST=fedora-$TIER" - rules: - - if: $CI_PROJECT_NAMESPACE != "fedora/bootc" - when: never - - if: $CI_PIPELINE_SOURCE == "merge_request_event" + script: buildah build -f Containerfile --no-cache -t localhost/fedora-bootc:minimal ${PRIV_ARGS} --build-arg=manifest=fedora-minimal . + +standard-build-and-test: + extends: .build-image + script: | + set -xeuo pipefail + buildah build --no-cache -t localhost/fedora-bootc ${PRIV_ARGS} . + cd tests + buildah build -f Containerfile.test-derive --no-cache -t localhost/fedora-bootc-derived ${PRIV_ARGS} . diff --git a/tests/Containerfile.test-c10s b/tests/Containerfile.test-derive similarity index 85% rename from tests/Containerfile.test-c10s rename to tests/Containerfile.test-derive index 2b6b4e6..52cd0a7 100644 --- a/tests/Containerfile.test-c10s +++ b/tests/Containerfile.test-derive @@ -1,7 +1,7 @@ # This test case exercises using the fedora-bootc image as a builder # to generate a minimal target image derived from CentOS Stream 10 content, # and then further extends it in a secondary phase. -FROM quay.io/centos/centos:stream10 as repos +FROM quay.io/fedora/fedora-bootc:rawhide as repos # This is intentionally a locally built image FROM localhost/fedora-bootc as builder @@ -12,16 +12,15 @@ FROM scratch COPY --from=builder /target-rootfs/ / RUN <