From 24874abbb6055c5f0f2ab6d27dbc15be2258172c Mon Sep 17 00:00:00 2001 From: hemantxpatel Date: Tue, 2 Jul 2024 12:36:38 +0530 Subject: [PATCH] Review Comments --- .github/workflows/run-terraform.yml | 10 ++++++++-- custom-tractusx-edc/build.gradle.kts | 8 ++++---- .../build.gradle.kts | 8 +------- .../build.gradle.kts | 8 +------- custom-tractusx-edc/gradle/libs.versions.toml | 5 +++++ 5 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/run-terraform.yml b/.github/workflows/run-terraform.yml index 6c1d1bc5..29a768c9 100644 --- a/.github/workflows/run-terraform.yml +++ b/.github/workflows/run-terraform.yml @@ -53,18 +53,24 @@ jobs: --for=condition=ready pod \ --selector=app.kubernetes.io/component=controller \ --timeout=90s - - name: Setup JDK 21 + - name: Setup JDK uses: actions/setup-java@v3.13.0 with: - java-version: '21' + java-version: '22' distribution: 'temurin' - name: "Backend-Service Build" working-directory: mxd/backend-service run: |- ./gradlew clean dockerize + - name: "Custom TractusX EDC Build" + working-directory: custom-tractusx-edc + run: |- + ./gradlew clean dockerize - name: "Load Docker Images" run: |- kind load docker-image -n mxd backend-service:1.0.0 + kind load docker-image -n mxd custom-edc-controlplane-postgresql-hashicorp-vault:latest + kind load docker-image -n mxd custom-edc-dataplane-hashicorp-vault:latest - name: "Terraform init" working-directory: mxd run: |- diff --git a/custom-tractusx-edc/build.gradle.kts b/custom-tractusx-edc/build.gradle.kts index 2f30ebcd..3c2e495b 100644 --- a/custom-tractusx-edc/build.gradle.kts +++ b/custom-tractusx-edc/build.gradle.kts @@ -14,15 +14,15 @@ import com.bmuschko.gradle.docker.tasks.image.DockerBuildImage import com.github.jengelman.gradle.plugins.shadow.ShadowJavaPlugin -import java.time.Duration plugins { `java-library` - id("com.github.johnrengelman.shadow") version "8.1.1" - id("com.bmuschko.docker-remote-api") version "9.4.0" + alias(libs.plugins.shadow) + alias(libs.plugins.docker) } val edcVersion = libs.versions.edc +val openTelemetryVersion = libs.versions.opentelemetry.get() buildscript { repositories { @@ -57,7 +57,7 @@ subprojects { val agentFile = buildDir.resolve("opentelemetry-javaagent.jar") // create task to download the opentelemetry agent - val openTelemetryAgentUrl = "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v1.32.0/opentelemetry-javaagent.jar" + val openTelemetryAgentUrl = "https://github.com/open-telemetry/opentelemetry-java-instrumentation/releases/download/v${openTelemetryVersion}/opentelemetry-javaagent.jar" val downloadOtel = tasks.create("downloadOtel") { // only execute task if the opentelemetry agent does not exist. invoke the "clean" task to force onlyIf { diff --git a/custom-tractusx-edc/custom-edc-controlplane-postgresql-hashicorp-vault/build.gradle.kts b/custom-tractusx-edc/custom-edc-controlplane-postgresql-hashicorp-vault/build.gradle.kts index 98d9bb4d..556d7f7e 100644 --- a/custom-tractusx-edc/custom-edc-controlplane-postgresql-hashicorp-vault/build.gradle.kts +++ b/custom-tractusx-edc/custom-edc-controlplane-postgresql-hashicorp-vault/build.gradle.kts @@ -17,7 +17,7 @@ import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar plugins { `java-library` id("application") - id("com.github.johnrengelman.shadow") version "8.1.1" + alias(libs.plugins.shadow) } dependencies { @@ -29,7 +29,6 @@ dependencies { } tasks.withType { - exclude("**/pom.properties", "**/pom.xm") mergeServiceFiles() archiveFileName.set("${project.name}.jar") } @@ -37,8 +36,3 @@ tasks.withType { application { mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime") } - -// do not publish -edcBuild { - publish.set(false) -} diff --git a/custom-tractusx-edc/custom-edc-dataplane-hashicorp-vault/build.gradle.kts b/custom-tractusx-edc/custom-edc-dataplane-hashicorp-vault/build.gradle.kts index 33325a5a..22e44705 100644 --- a/custom-tractusx-edc/custom-edc-dataplane-hashicorp-vault/build.gradle.kts +++ b/custom-tractusx-edc/custom-edc-dataplane-hashicorp-vault/build.gradle.kts @@ -15,7 +15,7 @@ plugins { `java-library` id("application") - id("com.github.johnrengelman.shadow") version "8.1.1" + alias(libs.plugins.shadow) } dependencies { @@ -27,7 +27,6 @@ dependencies { } tasks.withType { - exclude("**/pom.properties", "**/pom.xm") mergeServiceFiles() archiveFileName.set("${project.name}.jar") } @@ -35,8 +34,3 @@ tasks.withType { application { mainClass.set("org.eclipse.edc.boot.system.runtime.BaseRuntime") } - -// do not publish -edcBuild { - publish.set(false) -} diff --git a/custom-tractusx-edc/gradle/libs.versions.toml b/custom-tractusx-edc/gradle/libs.versions.toml index 02b547fb..88f53269 100644 --- a/custom-tractusx-edc/gradle/libs.versions.toml +++ b/custom-tractusx-edc/gradle/libs.versions.toml @@ -4,6 +4,7 @@ format.version = "1.1" [versions] edc = "0.7.0" tractusx = "0.7.2" +opentelemetry = "1.32.0" [libraries] edc-controlplane-postgresql-hashicorp-vault = { module = "org.eclipse.tractusx.edc:edc-controlplane-postgresql-hashicorp-vault", version.ref = "tractusx" } @@ -11,3 +12,7 @@ edc-dataplane-hashicorp-vault = { module = "org.eclipse.tractusx.edc:edc-datapla edc-identity-trust-sts-remote-client = { module = "org.eclipse.edc:identity-trust-sts-remote-client", version.ref = "edc" } edc-auth-oauth2-client = { module = "org.eclipse.edc:oauth2-client", version.ref = "edc" } edc-build-plugin = { module = "org.eclipse.edc.edc-build:org.eclipse.edc.edc-build.gradle.plugin", version.ref = "edc" } + +[plugins] +shadow = { id = "com.github.johnrengelman.shadow", version = "8.1.1" } +docker = { id = "com.bmuschko.docker-remote-api", version = "9.4.0" }