From 0e1db479848b945baa84514b0c38f9d3d420f098 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Tue, 6 Aug 2024 17:02:39 +0200 Subject: [PATCH] Add platform selection for container images --- build.gradle.kts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index e8a21e10..b6253f25 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -309,6 +309,16 @@ testing { tasks.named("check") { dependsOn(integrationTest, systemTest) } + + tasks.named("integrationTestOciRegistryData", oci.imagesTaskClass) { + val linuxAmd64 = oci.platformSelector(oci.platform("linux", "amd64")) + val linuxArm64v8 = oci.platformSelector(oci.platform("linux", "arm64", "v8")) + platformSelector = if (System.getenv("CI_RUN") != null) { + linuxAmd64 + } else { + linuxAmd64.and(linuxArm64v8) + } + } } }