From c732047eace1c1e60a18933359100c918128c0a0 Mon Sep 17 00:00:00 2001 From: Fedor Dudinsky Date: Thu, 7 Nov 2024 15:56:07 +0100 Subject: [PATCH] Allow wait container to run on different architectures - Add a script to generate an image for x86, ARM, IBM P and IBM Z - Enable back the tests on the new architectures Fixes https://github.com/quarkus-qe/quarkus-test-suite/issues/2071 (cherry picked from commit 4ee70aba5e87ff6ef4a6ae9d7d982bbd8c2294fb) --- .../init/OpenShiftDefaultInitContainerIT.java | 5 +---- sql-db/panache-flyway/src/test/resources/build.sh | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 4 deletions(-) create mode 100755 sql-db/panache-flyway/src/test/resources/build.sh diff --git a/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/init/OpenShiftDefaultInitContainerIT.java b/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/init/OpenShiftDefaultInitContainerIT.java index f189ab4f6..eb2afd772 100644 --- a/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/init/OpenShiftDefaultInitContainerIT.java +++ b/sql-db/panache-flyway/src/test/java/io/quarkus/ts/sqldb/panacheflyway/init/OpenShiftDefaultInitContainerIT.java @@ -11,7 +11,6 @@ import org.apache.http.HttpStatus; import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.condition.DisabledIfSystemProperty; import org.yaml.snakeyaml.Yaml; import io.quarkus.test.bootstrap.MySqlService; @@ -22,13 +21,11 @@ import io.quarkus.test.services.QuarkusApplication; @OpenShiftScenario(deployment = OpenShiftDeploymentStrategy.UsingOpenShiftExtension) -@DisabledIfSystemProperty(named = "ts.arm.missing.services.excludes", matches = "true", disabledReason = "https://github.com/quarkus-qe/quarkus-test-suite/issues/2071") -@DisabledIfSystemProperty(named = "ts.ibm-z-p.missing.services.excludes", matches = "true", disabledReason = "Same reason as aarch64 https://github.com/quarkus-qe/quarkus-test-suite/issues/2071") public class OpenShiftDefaultInitContainerIT { private final Path openShiftYaml = Paths.get("target/", this.getClass().getSimpleName(), "app/target/kubernetes/openshift.yml"); - private static final String CUSTOM_IMAGE = "quay.io/quarkusqeteam/wait:0.0.2"; + private static final String CUSTOM_IMAGE = "quay.io/quarkusqeteam/wait:0.0.4"; @Container(image = "${mysql.80.image}", port = 3306, expectedLog = "Only MySQL server logs after this point") static MySqlService database = new MySqlService(); diff --git a/sql-db/panache-flyway/src/test/resources/build.sh b/sql-db/panache-flyway/src/test/resources/build.sh new file mode 100755 index 000000000..0993b3537 --- /dev/null +++ b/sql-db/panache-flyway/src/test/resources/build.sh @@ -0,0 +1,14 @@ +#!/bin/bash +# based on these guides: https://blog.while-true-do.io/podman-multi-arch-images/ and https://community.ibm.com/community/user/powerdeveloper/blogs/mayur-waghmode/2022/09/19/building-multi-arch-container-images-with-github-a + +set -euxo pipefail + +version=${1} +if [ -z "$version" ]; then + echo "Provide version for https://quay.io/repository/quarkusqeteam/wait container!" + exit 1 +fi +TAG="quay.io/quarkusqeteam/wait:$version" +podman manifest create $TAG +podman build . --platform linux/amd64,linux/arm64,linux/ppc64le,linux/s390x --manifest $TAG --file Dockerfile +podman manifest push $TAG