Skip to content

Commit b807a9a

Browse files
author
Rob Tjalma
authored
Merge pull request #94 from com-pas/jvm-it
Changed build of jvm/native image in POM and Actions.
2 parents 112e090 + b813b67 commit b807a9a

File tree

4 files changed

+55
-12
lines changed

4 files changed

+55
-12
lines changed

.github/workflows/build-project.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ jobs:
4848
with:
4949
output_file: custom_maven_settings.xml
5050
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
51-
- name: Build Native with Maven
51+
- name: Build with Maven (Pull Request)
5252
if: ${{ github.event_name == 'pull_request' }}
53-
run: ./mvnw -s custom_maven_settings.xml -B -Pnative clean verify
54-
- name: Build with Maven
53+
run: ./mvnw -s custom_maven_settings.xml -B -Pnative-image clean verify
54+
- name: Build with Maven (Push)
5555
if: ${{ github.event_name == 'push' }}
5656
run: ./mvnw -s custom_maven_settings.xml -B clean verify

.github/workflows/release-project.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Release Project
66

77
on:
88
release:
9-
types: [released]
9+
types: [ released ]
1010

1111
jobs:
1212
push_to_registry:
@@ -57,6 +57,6 @@ jobs:
5757
env:
5858
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5959
- name: Deploy with Maven to GitHub Packages and Docker Hub
60-
run: ./mvnw -B -s custom_maven_settings.xml -Prelease,native clean deploy
60+
run: ./mvnw -B -s custom_maven_settings.xml -Pnative-image,release clean deploy
6161
env:
6262
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

app/pom.xml

Lines changed: 49 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,50 @@ SPDX-License-Identifier: Apache-2.0
141141

142142
<profiles>
143143
<profile>
144-
<id>native</id>
144+
<id>jvm-image</id>
145145

146146
<properties>
147+
<!-- Make a Docker Image, so the integration tests will be executed against the container -->
148+
<quarkus.container-image.build>true</quarkus.container-image.build>
149+
</properties>
150+
151+
<build>
152+
<plugins>
153+
<plugin>
154+
<groupId>org.apache.maven.plugins</groupId>
155+
<artifactId>maven-failsafe-plugin</artifactId>
156+
<version>${surefire-plugin.version}</version>
157+
<executions>
158+
<execution>
159+
<goals>
160+
<goal>integration-test</goal>
161+
<goal>verify</goal>
162+
</goals>
163+
<configuration>
164+
<systemPropertyVariables>
165+
<java.util.logging.manager>
166+
org.jboss.logmanager.LogManager
167+
</java.util.logging.manager>
168+
<maven.home>${maven.home}</maven.home>
169+
</systemPropertyVariables>
170+
</configuration>
171+
</execution>
172+
</executions>
173+
</plugin>
174+
</plugins>
175+
</build>
176+
</profile>
177+
178+
<profile>
179+
<id>native-image</id>
180+
181+
<properties>
182+
<!-- Make a Docker Image, so the integration tests will be executed against the container -->
183+
<quarkus.container-image.build>true</quarkus.container-image.build>
184+
147185
<quarkus.package.type>native</quarkus.package.type>
148-
<quarkus.native.container-build>true</quarkus.native.container-build> <!-- Allows for creating a Linux executable without GraalVM being installed -->
149-
<quarkus.container-image.build>true</quarkus.container-image.build> <!-- Also make a Docker Image, so the native test will be executed against the container -->
186+
<!-- Allows for creating a Linux executable without GraalVM being installed -->
187+
<quarkus.native.container-build>true</quarkus.native.container-build>
150188
</properties>
151189

152190
<build>
@@ -163,8 +201,11 @@ SPDX-License-Identifier: Apache-2.0
163201
</goals>
164202
<configuration>
165203
<systemPropertyVariables>
166-
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
167-
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
204+
<native.image.path>
205+
${project.build.directory}/${project.build.finalName}-runner
206+
</native.image.path>
207+
<java.util.logging.manager>org.jboss.logmanager.LogManager
208+
</java.util.logging.manager>
168209
<maven.home>${maven.home}</maven.home>
169210
</systemPropertyVariables>
170211
</configuration>
@@ -190,8 +231,10 @@ SPDX-License-Identifier: Apache-2.0
190231
<id>release</id>
191232

192233
<properties>
193-
<!-- Properties only used for publishing a native docker image (default to Docker Hub) -->
234+
<!-- Make a Docker Image from the component -->
194235
<quarkus.container-image.build>true</quarkus.container-image.build>
236+
237+
<!-- Properties only used for publishing a native docker image (default to Docker Hub) -->
195238
<quarkus.container-image.push>true</quarkus.container-image.push>
196239
<quarkus.container-image.additional-tags>latest</quarkus.container-image.additional-tags>
197240
</properties>
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)