Verified Commit fcc778f5 authored by tr's avatar tr

Add a test stage.

parent 2b4f130a
Pipeline #3181 passed with stages
in 5 minutes and 36 seconds
......@@ -2,6 +2,7 @@
stages:
- build
- test
- publish
before_script:
......@@ -63,6 +64,54 @@ build_centos_8:
extends: .build_image
.test_image:
stage: test
tags:
- buildah
image: "$CI_REGISTRY/immerda/container-images/buildah/$DISTRO:$RELEASE"
script:
- . "$DISTRO-$RELEASE.version" ; export VERSION
- echo "$VERSION"
- skopeo copy "docker-archive:$(pwd)/$DISTRO-$RELEASE.tar" "containers-storage:localhost/buildah/$DISTRO:$VERSION"
- podman run --net=host -it --rm "localhost/buildah/$DISTRO:$VERSION" buildah --version
test_fedora_31:
dependencies:
- build_fedora_31
variables:
DISTRO: fedora
RELEASE: 31
stage: test
tags:
- buildah
image: "$CI_REGISTRY/immerda/container-images/buildah/$DISTRO:$RELEASE"
script:
- . "$DISTRO-$RELEASE.version" ; export VERSION
- echo "$VERSION"
- skopeo copy "docker-archive:$(pwd)/$DISTRO-$RELEASE.tar" "containers-storage:localhost/buildah/$DISTRO:$VERSION"
- podman run -it --rm "localhost/buildah/$DISTRO:$VERSION" buildah --version || exit_code="$?"
- if [ "$exit_code" -ne 0 ]; then echo "Previous command is expected to fail, due to podman bug"; else echo "Podman seems fixed?!" && exit 1; fi;
needs: ["build_fedora_31"]
test_centos_7:
dependencies:
- build_centos_7
variables:
DISTRO: centos
RELEASE: 7
extends: .test_image
needs: ["build_centos_7"]
test_centos_8:
dependencies:
- build_centos_8
variables:
DISTRO: centos
RELEASE: 8
extends: .test_image
needs: ["build_centos_8"]
.publish_image:
stage: publish
tags:
......@@ -94,7 +143,7 @@ publish_fedora_31:
DISTRO: fedora
RELEASE: 31
extends: .publish_image
needs: ["build_fedora_31"]
needs: ["build_fedora_31", "test_fedora_31"]
publish_centos_7:
dependencies:
......@@ -103,7 +152,7 @@ publish_centos_7:
DISTRO: centos
RELEASE: 7
extends: .publish_image
needs: ["build_centos_7"]
needs: ["build_centos_7", "test_centos_7"]
publish_centos_8:
dependencies:
......@@ -112,4 +161,4 @@ publish_centos_8:
DISTRO: centos
RELEASE: 8
extends: .publish_image
needs: ["build_centos_8"]
needs: ["build_centos_8", "test_centos_8"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment