Skip to content

Commit

Permalink
Allow wait container to run on different architectures
Browse files Browse the repository at this point in the history
- Add a script to generate an image for x86, ARM, IBM P and IBM Z
- Enable back the tests on the new architectures
Fixes quarkus-qe#2071

(cherry picked from commit 4ee70ab)
  • Loading branch information
fedinskiy authored and jedla97 committed Nov 28, 2024
1 parent 5c24349 commit 4d0b2b9
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down
14 changes: 14 additions & 0 deletions sql-db/panache-flyway/src/test/resources/build.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 4d0b2b9

Please sign in to comment.