From 42ce7f6124b3b57f01b284b4eb43c89525619fb5 Mon Sep 17 00:00:00 2001 From: Jessie Krul Date: Mon, 14 Apr 2025 10:38:52 +0200 Subject: [PATCH 1/9] feat: test gha upload with max compression --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d1ca902b75b..6509108a438 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,6 +51,7 @@ jobs: with: name: warFiles path: staging + compression-level: 9 docker: name: Building docker images From 6ff18f653a5d18fd46eda193b3606b33ad6baa5b Mon Sep 17 00:00:00 2001 From: Jessie Krul Date: Mon, 14 Apr 2025 10:59:51 +0200 Subject: [PATCH 2/9] feat: 2 threads --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6509108a438..7a0cb81ab0a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,7 +42,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: ./mvnw -T1C -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=gxf -Dsonar.projectKey=OSGP_open-smart-grid-platform ${{ steps.maven_options.outputs.maven_options }} + run: ./mvnw -T2C -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=gxf -Dsonar.projectKey=OSGP_open-smart-grid-platform ${{ steps.maven_options.outputs.maven_options }} - name: Staging war and jar files run: mkdir staging && find . -path ./staging -prune -o \( -name gxf -o -name cucumber-*-test-jar-with-dependencies.jar -o -name *simulator*.war \) -exec cp -prv --parents '{}' staging/ \; if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') From c2366b490b1af0d057fdfd078524db177d65f41b Mon Sep 17 00:00:00 2001 From: Jessie Krul Date: Mon, 14 Apr 2025 15:41:49 +0200 Subject: [PATCH 3/9] feat: separate upload --- .github/workflows/build.yml | 218 ++++++++++++++++++++++++++++++++++-- 1 file changed, 208 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7a0cb81ab0a..0093d43d4ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,15 +43,192 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} run: ./mvnw -T2C -B verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.host.url=https://sonarcloud.io -Dsonar.organization=gxf -Dsonar.projectKey=OSGP_open-smart-grid-platform ${{ steps.maven_options.outputs.maven_options }} - - name: Staging war and jar files - run: mkdir staging && find . -path ./staging -prune -o \( -name gxf -o -name cucumber-*-test-jar-with-dependencies.jar -o -name *simulator*.war \) -exec cp -prv --parents '{}' staging/ \; + + # Upload war and jar files + + - name: Upload osgp-core + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-core + path: osgp/platform/osgp-core/target/gxf + + - name: Upload osgp-logging + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-logging + path: osgp/platform/osgp-logging/target/gxf + + - name: Upload osgp-adapter-domain-admin + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-domain-admin + path: osgp/platform/osgp-adapter-domain-admin/target/gxf + + - name: Upload osgp-adapter-domain-core + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-domain-core + path: osgp/platform/osgp-adapter-domain-core/target/gxf + + - name: Upload osgp-adapter-domain-publiclighting + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-domain-publiclighting + path: osgp/platform/osgp-adapter-domain-publiclighting/target/gxf + + - name: Upload osgp-adapter-domain-smartmetering + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-domain-smartmetering + path: osgp/platform/osgp-adapter-domain-smartmetering/target/gxf + + - name: Upload osgp-adapter-domain-tariffswitching + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-domain-tariffswitching + path: osgp/platform/osgp-adapter-domain-tariffswitching/target/gxf + + - name: Upload osgp-adapter-ws-admin + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-ws-admin + path: osgp/platform/osgp-adapter-ws-admin/target/gxf + + - name: Upload osgp-adapter-ws-core + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-ws-core + path: osgp/platform/osgp-adapter-ws-core/target/gxf + + - name: Upload osgp-adapter-ws-publiclighting + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-ws-publiclighting + path: osgp/platform/osgp-adapter-ws-publiclighting/target/gxf + + - name: Upload osgp-adapter-ws-smartmetering + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-ws-smartmetering + path: osgp/platform/osgp-adapter-ws-smartmetering/target/gxf + + - name: Upload osgp-adapter-ws-tariffswitching + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-adapter-ws-tariffswitching + path: osgp/platform/osgp-adapter-ws-tariffswitching/target/gxf + + - name: Upload osgp-protocol-adapter-iec60870 + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-protocol-adapter-iec60870 + path: osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/target/gxf + + - name: Upload osgp-protocol-adapter-iec61850 + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-protocol-adapter-iec61850 + path: osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/target/gxf + + - name: Upload osgp-protocol-adapter-oslp-elster + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-protocol-adapter-oslp-elster + path: osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/target/gxf + + - name: Upload signing-server + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: signing-server + path: osgp/protocol-adapter-oslp/signing-server/target/gxf + + - name: Find and copy osgp-protocol-simulator-iec60870 war + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + run: | + mkdir -p osgp-protocol-simulator-iec60870 + find osgp/protocol-adapter-iec60870/osgp-protocol-simulator-iec60870/target -name 'osgp-protocol-simulator-iec60870-*.war' -exec cp '{}' osgp-protocol-simulator-iec60870/ \; + - name: Upload osgp-protocol-simulator-iec60870 + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-protocol-simulator-iec60870 + path: osgp-protocol-simulator-iec60870 + + - name: Find and copy web-device-simulator war + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + run: | + mkdir -p web-device-simulator + find osgp/protocol-adapter-oslp/web-device-simulator/target -name 'web-device-simulator-*.war' -exec cp '{}' web-device-simulator/ \; + - name: Upload web-device-simulator + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: web-device-simulator + path: web-device-simulator + + - name: Find and copy osgp-protocol-simulator-iec61850 war + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + run: | + mkdir -p osgp-protocol-simulator-iec61850 + find osgp/protocol-adapter-iec61850/osgp-protocol-simulator-iec61850/target -name 'osgp-protocol-simulator-iec61850-*.war' -exec cp '{}' osgp-protocol-simulator-iec61850/ \; + - name: Upload osgp-protocol-simulator-iec61850 + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: osgp-protocol-simulator-iec61850 + path: osgp-protocol-simulator-iec61850 + + - name: Find and copy cucumber-tests-platform-common jar + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + run: | + mkdir -p cucumber-tests-platform-common + find integration-tests/cucumber-tests-platform-common/target -name 'cucumber-tests-platform-common-*-test-jar-with-dependencies.jar' -exec cp '{}' cucumber-tests-platform-common/ \; + - name: Upload cucumber-tests-platform-common + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: cucumber-tests-platform-common + path: cucumber-tests-platform-common + + - name: Find and copy cucumber-tests-platform-publiclighting jar + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + run: | + mkdir -p cucumber-tests-platform-publiclighting + find integration-tests/cucumber-tests-platform-publiclighting/target -name 'cucumber-tests-platform-publiclighting-*-test-jar-with-dependencies.jar' -exec cp '{}' cucumber-tests-platform-publiclighting/ \; + - name: Upload cucumber-tests-platform-publiclighting + if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 + with: + name: cucumber-tests-platform-publiclighting + path: cucumber-tests-platform-publiclighting + + - name: Find and copy cucumber-tests-platform-smartmetering jar if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') - - uses: actions/upload-artifact@v4 + run: | + mkdir -p cucumber-tests-platform-smartmetering + find integration-tests/cucumber-tests-platform-smartmetering/target -name 'cucumber-tests-platform-smartmetering-*-test-jar-with-dependencies.jar' -exec cp '{}' cucumber-tests-platform-smartmetering/ \; + - name: Upload cucumber-tests-platform-smartmetering if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') + uses: actions/upload-artifact@v4 with: - name: warFiles - path: staging - compression-level: 9 + name: cucumber-tests-platform-smartmetering + path: cucumber-tests-platform-smartmetering docker: name: Building docker images @@ -69,48 +246,70 @@ jobs: matrix: include: - image: ghcr.io/osgp/osgp-core + artifact: osgp-core context: ./osgp/platform/osgp-core/ - image: ghcr.io/osgp/osgp-logging + artifact: osgp-logging context: ./osgp/platform/osgp-logging/ - image: ghcr.io/osgp/osgp-adapter-domain-admin + artifact: osgp-adapter-domain-admin context: ./osgp/platform/osgp-adapter-domain-admin/ - image: ghcr.io/osgp/osgp-adapter-domain-core + artifact: osgp-adapter-domain-core context: ./osgp/platform/osgp-adapter-domain-core/ - image: ghcr.io/osgp/osgp-adapter-domain-publiclighting + artifact: osgp-adapter-domain-publiclighting context: ./osgp/platform/osgp-adapter-domain-publiclighting/ - image: ghcr.io/osgp/osgp-adapter-domain-smartmetering + artifact: osgp-adapter-domain-smartmetering context: ./osgp/platform/osgp-adapter-domain-smartmetering/ - image: ghcr.io/osgp/osgp-adapter-domain-tariffswitching + artifact: osgp-adapter-domain-tariffswitching context: ./osgp/platform/osgp-adapter-domain-tariffswitching/ - image: ghcr.io/osgp/osgp-adapter-ws-admin + artifact: osgp-adapter-ws-admin context: ./osgp/platform/osgp-adapter-ws-admin/ - image: ghcr.io/osgp/osgp-adapter-ws-core + artifact: osgp-adapter-ws-core context: ./osgp/platform/osgp-adapter-ws-core/ - image: ghcr.io/osgp/osgp-adapter-ws-publiclighting + artifact: osgp-adapter-ws-publiclighting context: ./osgp/platform/osgp-adapter-ws-publiclighting/ - image: ghcr.io/osgp/osgp-adapter-ws-smartmetering + artifact: osgp-adapter-ws-smartmetering context: ./osgp/platform/osgp-adapter-ws-smartmetering/ - image: ghcr.io/osgp/osgp-adapter-ws-tariffswitching + artifact: osgp-adapter-ws-tariffswitching context: ./osgp/platform/osgp-adapter-ws-tariffswitching/ - image: ghcr.io/osgp/osgp-protocol-adapter-iec60870 + artifact: osgp-protocol-adapter-iec60870 context: ./osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870 - image: ghcr.io/osgp/osgp-protocol-simulator-iec60870 + artifact: osgp-protocol-simulator-iec60870 context: ./osgp/protocol-adapter-iec60870/osgp-protocol-simulator-iec60870 - image: ghcr.io/osgp/osgp-protocol-adapter-iec61850 + artifact: osgp-protocol-adapter-iec61850 context: ./osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850 - image: ghcr.io/osgp/osgp-protocol-simulator-iec61850 + artifact: osgp-protocol-simulator-iec61850 context: ./osgp/protocol-adapter-iec61850/osgp-protocol-simulator-iec61850 - image: ghcr.io/osgp/osgp-protocol-adapter-oslp + artifact: osgp-protocol-adapter-oslp-elster context: ./osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster - image: ghcr.io/osgp/osgp-signing-server + artifact: signing-server context: ./osgp/protocol-adapter-oslp/signing-server - image: ghcr.io/osgp/osgp-web-device-simulator + artifact: web-device-simulator context: ./osgp/protocol-adapter-oslp/web-device-simulator - image: ghcr.io/osgp/osgp-cucumber-tests-platform-common + artifact: cucumber-tests-platform-common context: ./integration-tests/cucumber-tests-platform-common - image: ghcr.io/osgp/osgp-cucumber-tests-platform-publiclighting + artifact: cucumber-tests-platform-publiclighting context: ./integration-tests/cucumber-tests-platform-publiclighting - image: ghcr.io/osgp/osgp-cucumber-tests-platform-smartmetering + artifact: cucumber-tests-platform-smartmetering context: ./integration-tests/cucumber-tests-platform-smartmetering steps: - name: Checkout @@ -118,9 +317,9 @@ jobs: - name: Download war files uses: actions/download-artifact@v4 with: - name: warFiles + name: ${{ matrix.artifact }} - name: Show files in current context - run: find ${{ matrix.context }} + run: find ./ - name: Log in to the Container registry uses: docker/login-action@v3 with: @@ -147,7 +346,6 @@ jobs: id: push uses: docker/build-push-action@v6 with: - context: ${{ matrix.context }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -166,7 +364,7 @@ jobs: checks: write strategy: matrix: - values_file: [ci/common-values.yaml, ci/publiclighting-values.yaml] + values_file: [ci/common-values.yaml, ci/publiclighting-values.yaml] steps: - name: Checkout gxf-gitops uses: actions/checkout@v4 From 666929efd26697f802fdb797ed38727e2587e8f5 Mon Sep 17 00:00:00 2001 From: Jessie Krul Date: Tue, 15 Apr 2025 08:32:01 +0200 Subject: [PATCH 4/9] feat: path fix for download-artifact? --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0093d43d4ba..5063b2c3332 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -317,6 +317,7 @@ jobs: - name: Download war files uses: actions/download-artifact@v4 with: + path: ${{ matrix.context }} name: ${{ matrix.artifact }} - name: Show files in current context run: find ./ From 9e95de6f9d598535eefab9bbbba4966c3142fb04 Mon Sep 17 00:00:00 2001 From: Jessie Krul Date: Tue, 15 Apr 2025 09:22:07 +0200 Subject: [PATCH 5/9] feat: path fix for download-artifact? --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5063b2c3332..e92818287b2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -320,7 +320,7 @@ jobs: path: ${{ matrix.context }} name: ${{ matrix.artifact }} - name: Show files in current context - run: find ./ + run: find ${{ matrix.context }} - name: Log in to the Container registry uses: docker/login-action@v3 with: From 2e24f36b7ed6df3e6196d48fcb6ac2cc75d16d56 Mon Sep 17 00:00:00 2001 From: Jessie Krul Date: Wed, 16 Apr 2025 09:08:28 +0200 Subject: [PATCH 6/9] feat: path fix for download-artifact? --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e92818287b2..449aed523e7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -347,6 +347,7 @@ jobs: id: push uses: docker/build-push-action@v6 with: + context: ${{ matrix.context }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} From ee9ffa247388ef65447b7c22abe6ca926a673fb6 Mon Sep 17 00:00:00 2001 From: Jessie Krul Date: Wed, 16 Apr 2025 12:36:59 +0200 Subject: [PATCH 7/9] feat: path fix for download-artifact? --- .github/workflows/build.yml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 449aed523e7..6b5b0169df6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,112 +51,112 @@ jobs: uses: actions/upload-artifact@v4 with: name: osgp-core - path: osgp/platform/osgp-core/target/gxf + path: osgp/platform/osgp-core/ - name: Upload osgp-logging if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-logging - path: osgp/platform/osgp-logging/target/gxf + path: osgp/platform/osgp-logging/ - name: Upload osgp-adapter-domain-admin if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-admin - path: osgp/platform/osgp-adapter-domain-admin/target/gxf + path: osgp/platform/osgp-adapter-domain-admin/ - name: Upload osgp-adapter-domain-core if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-core - path: osgp/platform/osgp-adapter-domain-core/target/gxf + path: osgp/platform/osgp-adapter-domain-core/ - name: Upload osgp-adapter-domain-publiclighting if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-publiclighting - path: osgp/platform/osgp-adapter-domain-publiclighting/target/gxf + path: osgp/platform/osgp-adapter-domain-publiclighting/ - name: Upload osgp-adapter-domain-smartmetering if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-smartmetering - path: osgp/platform/osgp-adapter-domain-smartmetering/target/gxf + path: osgp/platform/osgp-adapter-domain-smartmetering/ - name: Upload osgp-adapter-domain-tariffswitching if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-tariffswitching - path: osgp/platform/osgp-adapter-domain-tariffswitching/target/gxf + path: osgp/platform/osgp-adapter-domain-tariffswitching/ - name: Upload osgp-adapter-ws-admin if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-admin - path: osgp/platform/osgp-adapter-ws-admin/target/gxf + path: osgp/platform/osgp-adapter-ws-admin/ - name: Upload osgp-adapter-ws-core if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-core - path: osgp/platform/osgp-adapter-ws-core/target/gxf + path: osgp/platform/osgp-adapter-ws-core/ - name: Upload osgp-adapter-ws-publiclighting if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-publiclighting - path: osgp/platform/osgp-adapter-ws-publiclighting/target/gxf + path: osgp/platform/osgp-adapter-ws-publiclighting/ - name: Upload osgp-adapter-ws-smartmetering if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-smartmetering - path: osgp/platform/osgp-adapter-ws-smartmetering/target/gxf + path: osgp/platform/osgp-adapter-ws-smartmetering/ - name: Upload osgp-adapter-ws-tariffswitching if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-tariffswitching - path: osgp/platform/osgp-adapter-ws-tariffswitching/target/gxf + path: osgp/platform/osgp-adapter-ws-tariffswitching/ - name: Upload osgp-protocol-adapter-iec60870 if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-protocol-adapter-iec60870 - path: osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/target/gxf + path: osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/ - name: Upload osgp-protocol-adapter-iec61850 if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-protocol-adapter-iec61850 - path: osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/target/gxf + path: osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/ - name: Upload osgp-protocol-adapter-oslp-elster if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-protocol-adapter-oslp-elster - path: osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/target/gxf + path: osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/ - name: Upload signing-server if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: signing-server - path: osgp/protocol-adapter-oslp/signing-server/target/gxf + path: osgp/protocol-adapter-oslp/signing-server/ - name: Find and copy osgp-protocol-simulator-iec60870 war if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') From 119bf4dc7534418b9dd8254efe77df27cfc7a348 Mon Sep 17 00:00:00 2001 From: Jessie Krul Date: Wed, 16 Apr 2025 13:43:16 +0200 Subject: [PATCH 8/9] feat: path fix for download-artifact? --- .github/workflows/build.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6b5b0169df6..0b4cc6cabd7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -162,7 +162,7 @@ jobs: if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | mkdir -p osgp-protocol-simulator-iec60870 - find osgp/protocol-adapter-iec60870/osgp-protocol-simulator-iec60870/target -name 'osgp-protocol-simulator-iec60870-*.war' -exec cp '{}' osgp-protocol-simulator-iec60870/ \; + find osgp/protocol-adapter-iec60870/osgp-protocol-simulator-iec60870/target -name 'osgp-protocol-simulator-iec60870-*.war' -exec cp --parents '{}' osgp-protocol-simulator-iec60870/ \; - name: Upload osgp-protocol-simulator-iec60870 if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 @@ -174,7 +174,7 @@ jobs: if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | mkdir -p web-device-simulator - find osgp/protocol-adapter-oslp/web-device-simulator/target -name 'web-device-simulator-*.war' -exec cp '{}' web-device-simulator/ \; + find osgp/protocol-adapter-oslp/web-device-simulator/target -name 'web-device-simulator-*.war' -exec cp --parents '{}' web-device-simulator/ \; - name: Upload web-device-simulator if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 @@ -186,7 +186,7 @@ jobs: if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | mkdir -p osgp-protocol-simulator-iec61850 - find osgp/protocol-adapter-iec61850/osgp-protocol-simulator-iec61850/target -name 'osgp-protocol-simulator-iec61850-*.war' -exec cp '{}' osgp-protocol-simulator-iec61850/ \; + find osgp/protocol-adapter-iec61850/osgp-protocol-simulator-iec61850/target -name 'osgp-protocol-simulator-iec61850-*.war' -exec cp --parents '{}' osgp-protocol-simulator-iec61850/ \; - name: Upload osgp-protocol-simulator-iec61850 if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 @@ -198,7 +198,7 @@ jobs: if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | mkdir -p cucumber-tests-platform-common - find integration-tests/cucumber-tests-platform-common/target -name 'cucumber-tests-platform-common-*-test-jar-with-dependencies.jar' -exec cp '{}' cucumber-tests-platform-common/ \; + find integration-tests/cucumber-tests-platform-common/target -name 'cucumber-tests-platform-common-*-test-jar-with-dependencies.jar' -exec cp --parents '{}' cucumber-tests-platform-common/ \; - name: Upload cucumber-tests-platform-common if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 @@ -210,7 +210,7 @@ jobs: if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | mkdir -p cucumber-tests-platform-publiclighting - find integration-tests/cucumber-tests-platform-publiclighting/target -name 'cucumber-tests-platform-publiclighting-*-test-jar-with-dependencies.jar' -exec cp '{}' cucumber-tests-platform-publiclighting/ \; + find integration-tests/cucumber-tests-platform-publiclighting/target -name 'cucumber-tests-platform-publiclighting-*-test-jar-with-dependencies.jar' -exec cp --parents '{}' cucumber-tests-platform-publiclighting/ \; - name: Upload cucumber-tests-platform-publiclighting if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 @@ -222,7 +222,7 @@ jobs: if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | mkdir -p cucumber-tests-platform-smartmetering - find integration-tests/cucumber-tests-platform-smartmetering/target -name 'cucumber-tests-platform-smartmetering-*-test-jar-with-dependencies.jar' -exec cp '{}' cucumber-tests-platform-smartmetering/ \; + find integration-tests/cucumber-tests-platform-smartmetering/target -name 'cucumber-tests-platform-smartmetering-*-test-jar-with-dependencies.jar' -exec cp --parents '{}' cucumber-tests-platform-smartmetering/ \; - name: Upload cucumber-tests-platform-smartmetering if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 From bf14fdd53d9b447fadb6cc2e9f074def457d5145 Mon Sep 17 00:00:00 2001 From: Jessie Krul Date: Wed, 16 Apr 2025 14:46:28 +0200 Subject: [PATCH 9/9] feat: only upload required files and directories and skip checkout on image creation --- .github/workflows/build.yml | 116 ++++++++---------- .../osgp-adapter-domain-admin/Dockerfile | 2 +- .../osgp-adapter-domain-core/Dockerfile | 2 +- .../Dockerfile | 2 +- .../Dockerfile | 2 +- .../platform/osgp-adapter-ws-admin/Dockerfile | 2 +- osgp/platform/osgp-adapter-ws-core/Dockerfile | 2 +- .../osgp-adapter-ws-publiclighting/Dockerfile | 2 +- .../osgp-adapter-ws-smartmetering/Dockerfile | 2 +- .../Dockerfile | 2 +- osgp/platform/osgp-core/Dockerfile | 2 +- .../osgp-protocol-adapter-iec60870/Dockerfile | 2 +- .../osgp-protocol-adapter-iec61850/Dockerfile | 2 +- .../Dockerfile | 2 +- .../signing-server/Dockerfile | 2 +- .../web-device-simulator/Dockerfile | 2 +- 16 files changed, 66 insertions(+), 80 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0b4cc6cabd7..b9db29ae962 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -51,142 +51,152 @@ jobs: uses: actions/upload-artifact@v4 with: name: osgp-core - path: osgp/platform/osgp-core/ + path: | + osgp/platform/osgp-core/target/gxf + osgp/platform/osgp-core/context.xml - name: Upload osgp-logging if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-logging - path: osgp/platform/osgp-logging/ + path: | + osgp/platform/osgp-logging/target/gxf + osgp/platform/osgp-logging/context.xml - name: Upload osgp-adapter-domain-admin if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-admin - path: osgp/platform/osgp-adapter-domain-admin/ + path: osgp/platform/osgp-adapter-domain-admin/target/gxf - name: Upload osgp-adapter-domain-core if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-core - path: osgp/platform/osgp-adapter-domain-core/ + path: osgp/platform/osgp-adapter-domain-core/target/gxf - name: Upload osgp-adapter-domain-publiclighting if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-publiclighting - path: osgp/platform/osgp-adapter-domain-publiclighting/ + path: osgp/platform/osgp-adapter-domain-publiclighting/target/gxf - name: Upload osgp-adapter-domain-smartmetering if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-smartmetering - path: osgp/platform/osgp-adapter-domain-smartmetering/ + path: osgp/platform/osgp-adapter-domain-smartmetering/target/gxf - name: Upload osgp-adapter-domain-tariffswitching if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-domain-tariffswitching - path: osgp/platform/osgp-adapter-domain-tariffswitching/ + path: osgp/platform/osgp-adapter-domain-tariffswitching/target/gxf - name: Upload osgp-adapter-ws-admin if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-admin - path: osgp/platform/osgp-adapter-ws-admin/ + path: osgp/platform/osgp-adapter-ws-admin/target/gxf - name: Upload osgp-adapter-ws-core if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-core - path: osgp/platform/osgp-adapter-ws-core/ + path: osgp/platform/osgp-adapter-ws-core/target/gxf - name: Upload osgp-adapter-ws-publiclighting if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-publiclighting - path: osgp/platform/osgp-adapter-ws-publiclighting/ + path: osgp/platform/osgp-adapter-ws-publiclighting/target/gxf - name: Upload osgp-adapter-ws-smartmetering if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-smartmetering - path: osgp/platform/osgp-adapter-ws-smartmetering/ + path: osgp/platform/osgp-adapter-ws-smartmetering/target/gxf - name: Upload osgp-adapter-ws-tariffswitching if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-adapter-ws-tariffswitching - path: osgp/platform/osgp-adapter-ws-tariffswitching/ + path: osgp/platform/osgp-adapter-ws-tariffswitching/target/gxf - name: Upload osgp-protocol-adapter-iec60870 if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-protocol-adapter-iec60870 - path: osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/ + path: | + osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/target/gxf + osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/context.xml - name: Upload osgp-protocol-adapter-iec61850 if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-protocol-adapter-iec61850 - path: osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/ + path: | + osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/target/gxf + osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/context.xml - name: Upload osgp-protocol-adapter-oslp-elster if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: osgp-protocol-adapter-oslp-elster - path: osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/ + path: | + osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/target/gxf + osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/context.xml - name: Upload signing-server if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: name: signing-server - path: osgp/protocol-adapter-oslp/signing-server/ + path: osgp/protocol-adapter-oslp/signing-server/target/gxf - - name: Find and copy osgp-protocol-simulator-iec60870 war - if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') - run: | - mkdir -p osgp-protocol-simulator-iec60870 - find osgp/protocol-adapter-iec60870/osgp-protocol-simulator-iec60870/target -name 'osgp-protocol-simulator-iec60870-*.war' -exec cp --parents '{}' osgp-protocol-simulator-iec60870/ \; - - name: Upload osgp-protocol-simulator-iec60870 +# - name: Find and copy web-device-simulator war +# if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') +# run: | +# mkdir -p web-device-simulator/target +# find osgp/protocol-adapter-oslp/web-device-simulator/target -name 'web-device-simulator-*.war' -exec cp '{}' web-device-simulator/target \; + - name: Upload web-device-simulator if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: - name: osgp-protocol-simulator-iec60870 - path: osgp-protocol-simulator-iec60870 + name: web-device-simulator + path: osgp/protocol-adapter-oslp/web-device-simulator/target/gxf - - name: Find and copy web-device-simulator war + - name: Find and copy osgp-protocol-simulator-iec60870 war if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | - mkdir -p web-device-simulator - find osgp/protocol-adapter-oslp/web-device-simulator/target -name 'web-device-simulator-*.war' -exec cp --parents '{}' web-device-simulator/ \; - - name: Upload web-device-simulator + mkdir -p osgp-protocol-simulator-iec60870/target + find osgp/protocol-adapter-iec60870/osgp-protocol-simulator-iec60870/target -name 'osgp-protocol-simulator-iec60870-*.war' -exec cp '{}' osgp-protocol-simulator-iec60870/target \; + - name: Upload osgp-protocol-simulator-iec60870 if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 with: - name: web-device-simulator - path: web-device-simulator + name: osgp-protocol-simulator-iec60870 + path: osgp-protocol-simulator-iec60870 - name: Find and copy osgp-protocol-simulator-iec61850 war if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | - mkdir -p osgp-protocol-simulator-iec61850 - find osgp/protocol-adapter-iec61850/osgp-protocol-simulator-iec61850/target -name 'osgp-protocol-simulator-iec61850-*.war' -exec cp --parents '{}' osgp-protocol-simulator-iec61850/ \; + mkdir -p osgp-protocol-simulator-iec61850/target + find osgp/protocol-adapter-iec61850/osgp-protocol-simulator-iec61850/target -name 'osgp-protocol-simulator-iec61850-*.war' -exec cp '{}' osgp-protocol-simulator-iec61850/target \; - name: Upload osgp-protocol-simulator-iec61850 if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 @@ -197,8 +207,8 @@ jobs: - name: Find and copy cucumber-tests-platform-common jar if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | - mkdir -p cucumber-tests-platform-common - find integration-tests/cucumber-tests-platform-common/target -name 'cucumber-tests-platform-common-*-test-jar-with-dependencies.jar' -exec cp --parents '{}' cucumber-tests-platform-common/ \; + mkdir -p cucumber-tests-platform-common/target + find integration-tests/cucumber-tests-platform-common/target -name 'cucumber-tests-platform-common-*-test-jar-with-dependencies.jar' -exec cp '{}' cucumber-tests-platform-common/target \; - name: Upload cucumber-tests-platform-common if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 @@ -209,8 +219,8 @@ jobs: - name: Find and copy cucumber-tests-platform-publiclighting jar if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | - mkdir -p cucumber-tests-platform-publiclighting - find integration-tests/cucumber-tests-platform-publiclighting/target -name 'cucumber-tests-platform-publiclighting-*-test-jar-with-dependencies.jar' -exec cp --parents '{}' cucumber-tests-platform-publiclighting/ \; + mkdir -p cucumber-tests-platform-publiclighting/target + find integration-tests/cucumber-tests-platform-publiclighting/target -name 'cucumber-tests-platform-publiclighting-*-test-jar-with-dependencies.jar' -exec cp '{}' cucumber-tests-platform-publiclighting/target \; - name: Upload cucumber-tests-platform-publiclighting if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 @@ -221,8 +231,8 @@ jobs: - name: Find and copy cucumber-tests-platform-smartmetering jar if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') run: | - mkdir -p cucumber-tests-platform-smartmetering - find integration-tests/cucumber-tests-platform-smartmetering/target -name 'cucumber-tests-platform-smartmetering-*-test-jar-with-dependencies.jar' -exec cp --parents '{}' cucumber-tests-platform-smartmetering/ \; + mkdir -p cucumber-tests-platform-smartmetering/target + find integration-tests/cucumber-tests-platform-smartmetering/target -name 'cucumber-tests-platform-smartmetering-*-test-jar-with-dependencies.jar' -exec cp '{}' cucumber-tests-platform-smartmetering/target \; - name: Upload cucumber-tests-platform-smartmetering if: contains(github.ref, 'release') || contains(github.ref, 'development') || contains(github.event.pull_request.labels.*.name, 'build_containers') || contains(github.event.pull_request.labels.*.name, 'cucumber_testing') uses: actions/upload-artifact@v4 @@ -247,80 +257,57 @@ jobs: include: - image: ghcr.io/osgp/osgp-core artifact: osgp-core - context: ./osgp/platform/osgp-core/ - image: ghcr.io/osgp/osgp-logging artifact: osgp-logging - context: ./osgp/platform/osgp-logging/ - image: ghcr.io/osgp/osgp-adapter-domain-admin artifact: osgp-adapter-domain-admin - context: ./osgp/platform/osgp-adapter-domain-admin/ - image: ghcr.io/osgp/osgp-adapter-domain-core artifact: osgp-adapter-domain-core - context: ./osgp/platform/osgp-adapter-domain-core/ - image: ghcr.io/osgp/osgp-adapter-domain-publiclighting artifact: osgp-adapter-domain-publiclighting - context: ./osgp/platform/osgp-adapter-domain-publiclighting/ - image: ghcr.io/osgp/osgp-adapter-domain-smartmetering artifact: osgp-adapter-domain-smartmetering - context: ./osgp/platform/osgp-adapter-domain-smartmetering/ - image: ghcr.io/osgp/osgp-adapter-domain-tariffswitching artifact: osgp-adapter-domain-tariffswitching - context: ./osgp/platform/osgp-adapter-domain-tariffswitching/ - image: ghcr.io/osgp/osgp-adapter-ws-admin artifact: osgp-adapter-ws-admin - context: ./osgp/platform/osgp-adapter-ws-admin/ - image: ghcr.io/osgp/osgp-adapter-ws-core artifact: osgp-adapter-ws-core - context: ./osgp/platform/osgp-adapter-ws-core/ - image: ghcr.io/osgp/osgp-adapter-ws-publiclighting artifact: osgp-adapter-ws-publiclighting - context: ./osgp/platform/osgp-adapter-ws-publiclighting/ - image: ghcr.io/osgp/osgp-adapter-ws-smartmetering artifact: osgp-adapter-ws-smartmetering - context: ./osgp/platform/osgp-adapter-ws-smartmetering/ - image: ghcr.io/osgp/osgp-adapter-ws-tariffswitching artifact: osgp-adapter-ws-tariffswitching - context: ./osgp/platform/osgp-adapter-ws-tariffswitching/ - image: ghcr.io/osgp/osgp-protocol-adapter-iec60870 artifact: osgp-protocol-adapter-iec60870 - context: ./osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870 - image: ghcr.io/osgp/osgp-protocol-simulator-iec60870 artifact: osgp-protocol-simulator-iec60870 - context: ./osgp/protocol-adapter-iec60870/osgp-protocol-simulator-iec60870 - image: ghcr.io/osgp/osgp-protocol-adapter-iec61850 artifact: osgp-protocol-adapter-iec61850 - context: ./osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850 - image: ghcr.io/osgp/osgp-protocol-simulator-iec61850 artifact: osgp-protocol-simulator-iec61850 - context: ./osgp/protocol-adapter-iec61850/osgp-protocol-simulator-iec61850 - image: ghcr.io/osgp/osgp-protocol-adapter-oslp artifact: osgp-protocol-adapter-oslp-elster - context: ./osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster - image: ghcr.io/osgp/osgp-signing-server artifact: signing-server - context: ./osgp/protocol-adapter-oslp/signing-server - image: ghcr.io/osgp/osgp-web-device-simulator artifact: web-device-simulator - context: ./osgp/protocol-adapter-oslp/web-device-simulator - image: ghcr.io/osgp/osgp-cucumber-tests-platform-common artifact: cucumber-tests-platform-common - context: ./integration-tests/cucumber-tests-platform-common - image: ghcr.io/osgp/osgp-cucumber-tests-platform-publiclighting artifact: cucumber-tests-platform-publiclighting - context: ./integration-tests/cucumber-tests-platform-publiclighting - image: ghcr.io/osgp/osgp-cucumber-tests-platform-smartmetering artifact: cucumber-tests-platform-smartmetering - context: ./integration-tests/cucumber-tests-platform-smartmetering steps: - - name: Checkout - uses: actions/checkout@v4 +# - name: Checkout +# uses: actions/checkout@v4 - name: Download war files uses: actions/download-artifact@v4 with: - path: ${{ matrix.context }} name: ${{ matrix.artifact }} - name: Show files in current context - run: find ${{ matrix.context }} + run: find . - name: Log in to the Container registry uses: docker/login-action@v3 with: @@ -347,7 +334,6 @@ jobs: id: push uses: docker/build-push-action@v6 with: - context: ${{ matrix.context }} push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} diff --git a/osgp/platform/osgp-adapter-domain-admin/Dockerfile b/osgp/platform/osgp-adapter-domain-admin/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/platform/osgp-adapter-domain-admin/Dockerfile +++ b/osgp/platform/osgp-adapter-domain-admin/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/platform/osgp-adapter-domain-core/Dockerfile b/osgp/platform/osgp-adapter-domain-core/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/platform/osgp-adapter-domain-core/Dockerfile +++ b/osgp/platform/osgp-adapter-domain-core/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/platform/osgp-adapter-domain-smartmetering/Dockerfile b/osgp/platform/osgp-adapter-domain-smartmetering/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/platform/osgp-adapter-domain-smartmetering/Dockerfile +++ b/osgp/platform/osgp-adapter-domain-smartmetering/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/platform/osgp-adapter-domain-tariffswitching/Dockerfile b/osgp/platform/osgp-adapter-domain-tariffswitching/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/platform/osgp-adapter-domain-tariffswitching/Dockerfile +++ b/osgp/platform/osgp-adapter-domain-tariffswitching/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/platform/osgp-adapter-ws-admin/Dockerfile b/osgp/platform/osgp-adapter-ws-admin/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/platform/osgp-adapter-ws-admin/Dockerfile +++ b/osgp/platform/osgp-adapter-ws-admin/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/platform/osgp-adapter-ws-core/Dockerfile b/osgp/platform/osgp-adapter-ws-core/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/platform/osgp-adapter-ws-core/Dockerfile +++ b/osgp/platform/osgp-adapter-ws-core/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/platform/osgp-adapter-ws-publiclighting/Dockerfile b/osgp/platform/osgp-adapter-ws-publiclighting/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/platform/osgp-adapter-ws-publiclighting/Dockerfile +++ b/osgp/platform/osgp-adapter-ws-publiclighting/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/platform/osgp-adapter-ws-smartmetering/Dockerfile b/osgp/platform/osgp-adapter-ws-smartmetering/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/platform/osgp-adapter-ws-smartmetering/Dockerfile +++ b/osgp/platform/osgp-adapter-ws-smartmetering/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/platform/osgp-adapter-ws-tariffswitching/Dockerfile b/osgp/platform/osgp-adapter-ws-tariffswitching/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/platform/osgp-adapter-ws-tariffswitching/Dockerfile +++ b/osgp/platform/osgp-adapter-ws-tariffswitching/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/platform/osgp-core/Dockerfile b/osgp/platform/osgp-core/Dockerfile index 13a70f1116c..300607419b5 100644 --- a/osgp/platform/osgp-core/Dockerfile +++ b/osgp/platform/osgp-core/Dockerfile @@ -12,4 +12,4 @@ RUN mkdir -p /var/log/osp && \ touch /usr/local/tomcat/webapps/probe/probe.txt COPY context.xml /usr/local/tomcat/conf -COPY target/gxf /usr/local/tomcat/webapps/ +COPY osgp-core /usr/local/tomcat/webapps/osgp-core/ diff --git a/osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/Dockerfile b/osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/Dockerfile index 13a70f1116c..a3e07f7533b 100644 --- a/osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/Dockerfile +++ b/osgp/protocol-adapter-iec60870/osgp-protocol-adapter-iec60870/Dockerfile @@ -12,4 +12,4 @@ RUN mkdir -p /var/log/osp && \ touch /usr/local/tomcat/webapps/probe/probe.txt COPY context.xml /usr/local/tomcat/conf -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/Dockerfile b/osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/Dockerfile index 13a70f1116c..a3e07f7533b 100644 --- a/osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/Dockerfile +++ b/osgp/protocol-adapter-iec61850/osgp-protocol-adapter-iec61850/Dockerfile @@ -12,4 +12,4 @@ RUN mkdir -p /var/log/osp && \ touch /usr/local/tomcat/webapps/probe/probe.txt COPY context.xml /usr/local/tomcat/conf -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/Dockerfile b/osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/Dockerfile index 13a70f1116c..a3e07f7533b 100644 --- a/osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/Dockerfile +++ b/osgp/protocol-adapter-oslp/osgp-protocol-adapter-oslp-elster/Dockerfile @@ -12,4 +12,4 @@ RUN mkdir -p /var/log/osp && \ touch /usr/local/tomcat/webapps/probe/probe.txt COPY context.xml /usr/local/tomcat/conf -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/protocol-adapter-oslp/signing-server/Dockerfile b/osgp/protocol-adapter-oslp/signing-server/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/protocol-adapter-oslp/signing-server/Dockerfile +++ b/osgp/protocol-adapter-oslp/signing-server/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/ diff --git a/osgp/protocol-adapter-oslp/web-device-simulator/Dockerfile b/osgp/protocol-adapter-oslp/web-device-simulator/Dockerfile index 43126cd629a..1db4ea73a52 100644 --- a/osgp/protocol-adapter-oslp/web-device-simulator/Dockerfile +++ b/osgp/protocol-adapter-oslp/web-device-simulator/Dockerfile @@ -11,4 +11,4 @@ RUN mkdir -p /var/log/osp && \ mkdir -p /usr/local/tomcat/webapps/probe/ && \ touch /usr/local/tomcat/webapps/probe/probe.txt -COPY target/gxf /usr/local/tomcat/webapps/ +COPY . /usr/local/tomcat/webapps/