Skip to content

Commit 274ea1c

Browse files
authored
Merge pull request #1516 from OSGP/feature/FDP-2849-organisation-certs
FDP-2849: Adding organisation certs to container
2 parents cd572b3 + 69bf394 commit 274ea1c

File tree

4 files changed

+30
-6
lines changed

4 files changed

+30
-6
lines changed

.github/workflows/build.yml

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,14 @@ jobs:
103103
- image: ghcr.io/osgp/osgp-web-device-simulator
104104
context: ./osgp/protocol-adapter-oslp/web-device-simulator
105105
- image: ghcr.io/osgp/osgp-cucumber-tests-platform-common
106-
context: ./integration-tests/cucumber-tests-platform-common
106+
context: ./integration-tests
107+
file: /cucumber-tests-platform-common/Dockerfile
107108
- image: ghcr.io/osgp/osgp-cucumber-tests-platform-publiclighting
108-
context: ./integration-tests/cucumber-tests-platform-publiclighting
109+
context: ./integration-tests
110+
file: /cucumber-tests-platform-publiclighting/Dockerfile
109111
- image: ghcr.io/osgp/osgp-cucumber-tests-platform-smartmetering
110-
context: ./integration-tests/cucumber-tests-platform-smartmetering
112+
context: ./integration-tests
113+
file: /cucumber-tests-platform-smartmetering/Dockerfile
111114
steps:
112115
- name: Checkout
113116
uses: actions/checkout@v4
@@ -130,13 +133,31 @@ jobs:
130133
- name: Build and push Docker image
131134
id: push
132135
uses: docker/build-push-action@v6
136+
if: ${{ matrix.file == null }}
133137
with:
134138
context: ${{ matrix.context }}
135139
push: true
136140
tags: ${{ steps.meta.outputs.tags }}
137141
labels: ${{ steps.meta.outputs.labels }}
142+
- name: Build and push Docker image with file path
143+
id: pushWithFile
144+
uses: docker/build-push-action@v6
145+
if: ${{ matrix.file != null }}
146+
with:
147+
context: ${{ matrix.context }}
148+
file: ${{ matrix.context }}${{ matrix.file }}
149+
push: true
150+
tags: ${{ steps.meta.outputs.tags }}
151+
labels: ${{ steps.meta.outputs.labels }}
138152
- name: Generate artifact attestation
139153
uses: actions/attest-build-provenance@v1
154+
if: ${{ matrix.file == null }}
140155
with:
141156
subject-name: ${{ matrix.image }}
142157
subject-digest: ${{ steps.push.outputs.digest }}
158+
- name: Generate artifact attestation
159+
uses: actions/attest-build-provenance@v1
160+
if: ${{ matrix.file != null }}
161+
with:
162+
subject-name: ${{ matrix.image }}
163+
subject-digest: ${{ steps.pushWithFile.outputs.digest }}

integration-tests/cucumber-tests-platform-common/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM eclipse-temurin:17
22
WORKDIR /
3-
COPY target/cucumber-*-test-jar-with-dependencies.jar /
3+
COPY cucumber-tests-platform-common/target/cucumber-*-test-jar-with-dependencies.jar /
4+
COPY certificates /etc/ssl/certs/organisations/
45
RUN wget https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar
56
CMD java -javaagent:org.jacoco.agent-0.8.12-runtime.jar=destfile=/target/code-coverage/jacoco-it.exec \
67
-Dcucumber.execution.strict=true\

integration-tests/cucumber-tests-platform-publiclighting/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM eclipse-temurin:17
22
WORKDIR /
3-
COPY target/cucumber-*-test-jar-with-dependencies.jar /
3+
COPY cucumber-tests-platform-publiclighting/target/cucumber-*-test-jar-with-dependencies.jar /
4+
COPY certificates /etc/ssl/certs/organisations/
45
RUN wget https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar
56
CMD java -javaagent:org.jacoco.agent-0.8.12-runtime.jar=destfile=/target/code-coverage/jacoco-it.exec \
67
-Dcucumber.execution.strict=true\

integration-tests/cucumber-tests-platform-smartmetering/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
FROM eclipse-temurin:17
22
WORKDIR /
3-
COPY target/cucumber-*-test-jar-with-dependencies.jar /
3+
COPY cucumber-tests-platform-smartmetering/target/cucumber-*-test-jar-with-dependencies.jar /
4+
COPY certificates /etc/ssl/certs/organisations/
45
RUN wget https://repo1.maven.org/maven2/org/jacoco/org.jacoco.agent/0.8.12/org.jacoco.agent-0.8.12-runtime.jar
56
CMD java -javaagent:org.jacoco.agent-0.8.12-runtime.jar=destfile=/target/code-coverage/jacoco-it.exec \
67
-Dcucumber.execution.strict=true\

0 commit comments

Comments
 (0)