Skip to content

Commit 8659b11

Browse files
author
Dennis Labordus
committed
Changed build of jvm/native image in POM and Actions.
Signed-off-by: Dennis Labordus <[email protected]>
1 parent 515321f commit 8659b11

File tree

4 files changed

+37
-5
lines changed

4 files changed

+37
-5
lines changed

.github/workflows/build-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
5353
- name: Build with Maven (Pull Request)
5454
if: ${{ github.event_name == 'pull_request' }}
55-
run: ./mvnw -s custom_maven_settings.xml -B -Pbuild-image clean verify
55+
run: ./mvnw -s custom_maven_settings.xml -B -Pjvm-image clean verify
5656
- name: Build with Maven (Push)
5757
if: ${{ github.event_name == 'push' }}
5858
run: ./mvnw -s custom_maven_settings.xml -B clean verify

.github/workflows/release-project.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ jobs:
6666
./mvnw -B -s custom_maven_settings.xml \
6767
-DaltDeploymentRepository=github-packages-compas::default::https://maven.pkg.github.com/com-pas/compas-scl-validator \
6868
-Dmaven.deploy.skip=snapshots \
69-
-Pbuild-image,release clean deploy
69+
-Pjvm-image,release clean deploy
7070
env:
7171
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

app/pom.xml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,18 +170,47 @@ SPDX-License-Identifier: Apache-2.0
170170

171171
<profiles>
172172
<profile>
173-
<id>build-image</id>
173+
<id>jvm-image</id>
174174

175175
<properties>
176176
<!-- Make a Docker Image, so the integration tests will be executed against the container -->
177177
<quarkus.container-image.build>true</quarkus.container-image.build>
178178
</properties>
179+
180+
<build>
181+
<plugins>
182+
<plugin>
183+
<groupId>org.apache.maven.plugins</groupId>
184+
<artifactId>maven-failsafe-plugin</artifactId>
185+
<version>${surefire-plugin.version}</version>
186+
<executions>
187+
<execution>
188+
<goals>
189+
<goal>integration-test</goal>
190+
<goal>verify</goal>
191+
</goals>
192+
<configuration>
193+
<systemPropertyVariables>
194+
<java.util.logging.manager>
195+
org.jboss.logmanager.LogManager
196+
</java.util.logging.manager>
197+
<maven.home>${maven.home}</maven.home>
198+
</systemPropertyVariables>
199+
</configuration>
200+
</execution>
201+
</executions>
202+
</plugin>
203+
</plugins>
204+
</build>
179205
</profile>
180206

181207
<profile>
182-
<id>native</id>
208+
<id>native-image</id>
183209

184210
<properties>
211+
<!-- Make a Docker Image, so the integration tests will be executed against the container -->
212+
<quarkus.container-image.build>true</quarkus.container-image.build>
213+
185214
<quarkus.package.type>native</quarkus.package.type>
186215
<!-- Allows for creating a Linux executable without GraalVM being installed -->
187216
<quarkus.native.container-build>true</quarkus.native.container-build>
@@ -235,6 +264,9 @@ SPDX-License-Identifier: Apache-2.0
235264
<id>release</id>
236265

237266
<properties>
267+
<!-- Make a Docker Image from the component -->
268+
<quarkus.container-image.build>true</quarkus.container-image.build>
269+
238270
<!-- Properties only used for publishing a native docker image (default to Docker Hub) -->
239271
<quarkus.container-image.push>true</quarkus.container-image.push>
240272
<quarkus.container-image.additional-tags>latest</quarkus.container-image.additional-tags>

app/src/test/java/org/lfenergy/compas/scl/validator/rest/NativeHealthCheckIT.java renamed to app/src/test/java/org/lfenergy/compas/scl/validator/rest/HealthCheckIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@
66
import io.quarkus.test.junit.QuarkusIntegrationTest;
77

88
@QuarkusIntegrationTest
9-
class NativeHealthCheckIT extends HealthCheckTest {
9+
class HealthCheckIT extends HealthCheckTest {
1010
// Execute the same tests but in native mode.
1111
}

0 commit comments

Comments
 (0)