From 5344510cb99ed14e9a1b4cb9b8c9efb629c1f693 Mon Sep 17 00:00:00 2001 From: Sverre H Huseby Date: Tue, 10 Oct 2023 21:27:21 +0200 Subject: [PATCH 1/6] ci: build inside a builder container --- Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 46f4676..4a5386a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,12 @@ +FROM maven:3-eclipse-temurin-17 AS builder +WORKDIR /workspace +COPY pom.xml pom.xml +RUN mvn dependency:resolve +COPY src/ src/ +RUN mvn --batch-mode verify + FROM eclipse-temurin:17.0.8_7-jre-alpine WORKDIR /app -COPY target/k3a-lag-exporter-jar-with-dependencies.jar ./k3a-lag-exporter.jar +COPY --from=builder /workspace/target/k3a-lag-exporter-jar-with-dependencies.jar ./k3a-lag-exporter.jar ENTRYPOINT ["java", "-Dconfig.file=k3a-lag-exporter.conf", "-jar", "k3a-lag-exporter.jar"] From 26bbf4e76a0dc61283960cfaa920309547ebadc6 Mon Sep 17 00:00:00 2001 From: Sverre H Huseby Date: Tue, 10 Oct 2023 21:35:52 +0200 Subject: [PATCH 2/6] remove Java/Maven stuff --- .github/workflows/ci.yml | 6 ------ .github/workflows/main.yml | 6 ------ 2 files changed, 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 41e8517..ecd2168 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - run: mvn --batch-mode --update-snapshots verify - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - uses: docker/build-push-action@v5 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 6dfeebd..bd55d04 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -21,12 +21,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - uses: actions/setup-java@v3 - with: - java-version: '17' - distribution: 'temurin' - cache: maven - - run: mvn --batch-mode --update-snapshots verify - uses: docker/setup-qemu-action@v3 - uses: docker/setup-buildx-action@v3 - uses: docker/metadata-action@v5 From 0ada8597cd401a499cfe05f58d944e4fbd60dd9b Mon Sep 17 00:00:00 2001 From: Sverre H Huseby Date: Tue, 10 Oct 2023 21:39:42 +0200 Subject: [PATCH 3/6] change pom --- pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/pom.xml b/pom.xml index 64d32dc..ff09253 100644 --- a/pom.xml +++ b/pom.xml @@ -15,6 +15,7 @@ 2.13.5 + From 23be033fc64394b09b92fe053317d403ce1db34f Mon Sep 17 00:00:00 2001 From: Sverre H Huseby Date: Tue, 10 Oct 2023 21:42:51 +0200 Subject: [PATCH 4/6] undo change pom --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index ff09253..64d32dc 100644 --- a/pom.xml +++ b/pom.xml @@ -15,7 +15,6 @@ 2.13.5 - From 45474a227090028d5cddd3d5f7e583b7a091d429 Mon Sep 17 00:00:00 2001 From: Sverre H Huseby Date: Tue, 10 Oct 2023 21:45:21 +0200 Subject: [PATCH 5/6] change source file --- src/main/java/no/statnett/k3alagexporter/model/ClusterData.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/no/statnett/k3alagexporter/model/ClusterData.java b/src/main/java/no/statnett/k3alagexporter/model/ClusterData.java index 3dc98d2..a6ef437 100644 --- a/src/main/java/no/statnett/k3alagexporter/model/ClusterData.java +++ b/src/main/java/no/statnett/k3alagexporter/model/ClusterData.java @@ -1,3 +1,4 @@ + package no.statnett.k3alagexporter.model; import org.apache.kafka.common.TopicPartition; From 27daea82059def4ffd223d7d3ce6c1bc08c43e07 Mon Sep 17 00:00:00 2001 From: Sverre H Huseby Date: Tue, 10 Oct 2023 21:47:45 +0200 Subject: [PATCH 6/6] undo change source file --- src/main/java/no/statnett/k3alagexporter/model/ClusterData.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/no/statnett/k3alagexporter/model/ClusterData.java b/src/main/java/no/statnett/k3alagexporter/model/ClusterData.java index a6ef437..3dc98d2 100644 --- a/src/main/java/no/statnett/k3alagexporter/model/ClusterData.java +++ b/src/main/java/no/statnett/k3alagexporter/model/ClusterData.java @@ -1,4 +1,3 @@ - package no.statnett.k3alagexporter.model; import org.apache.kafka.common.TopicPartition;