From 5cda3d2764a49dbd8bd4adcacdd1790f68131439 Mon Sep 17 00:00:00 2001 From: Silvio Giebl Date: Mon, 9 Sep 2024 16:32:01 +0200 Subject: [PATCH] Update oci plugin to 0.16.0 --- build.gradle.kts | 34 +++++++++++++++++----------------- gradle/libs.versions.toml | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index e512be9b..2f16caaa 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -258,9 +258,14 @@ testing { implementation(project()) } - ociImageDependencies { - runtime("hivemq:hivemq4:latest") { isChanging = true } - runtime("hivemq:hivemq-swarm:latest") { isChanging = true } + oci.of(this) { + imageDependencies { + runtime("hivemq:hivemq4:latest") { isChanging = true } + runtime("hivemq:hivemq-swarm:latest") { isChanging = true } + } + val linuxAmd64 = platformSelector(platform("linux", "amd64")) + val linuxArm64v8 = platformSelector(platform("linux", "arm64", "v8")) + platformSelector = if (System.getenv("CI_RUN") != null) linuxAmd64 else linuxAmd64.and(linuxArm64v8) } } @@ -302,24 +307,19 @@ testing { implementation(libs.hivemq.mqttClient) } - ociImageDependencies { - runtime(project).tag("latest") + oci.of(this) { + imageDependencies { + runtime(project).tag("latest") + } + val linuxAmd64 = platformSelector(platform("linux", "amd64")) + val linuxArm64v8 = platformSelector(platform("linux", "arm64", "v8")) + platformSelector = if (System.getenv("CI_RUN") != null) linuxAmd64 else linuxAmd64.and(linuxArm64v8) } } 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) - } - } } } @@ -631,8 +631,8 @@ oci { } imageDefinitions.register("main") { allPlatforms { - parentImages { - add("library:eclipse-temurin:sha256!ea878d7ef79653c16f6bfdfbd3bf20ae80f4f645f66339e9153ae0d481385225") // 21.0.4_7-jre-jammy + dependencies { + runtime("library:eclipse-temurin:sha256!ea878d7ef79653c16f6bfdfbd3bf20ae80f4f645f66339e9153ae0d481385225") // 21.0.4_7-jre-jammy } config { entryPoint.add("java") diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 7a8831af..d19a7663 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -83,6 +83,6 @@ graalvm-native = { id = "org.graalvm.buildtools.native", version = "0.10.2" } launch4j = { id = "edu.sc.seis.launch4j", version = "3.0.6" } license = { id = "com.github.hierynomus.license", version = "0.16.1" } nebula-ospackage = { id = "com.netflix.nebula.ospackage", version = "11.10.0" } -oci = { id = "io.github.sgtsilvio.gradle.oci", version = "0.15.1" } +oci = { id = "io.github.sgtsilvio.gradle.oci", version = "0.16.0" } openapi-generator = { id = "org.openapi.generator", version = "7.8.0" } shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" }