Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed build of jvm/native image in POM and Actions. #94

Merged
merged 3 commits into from
May 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ jobs:
with:
output_file: custom_maven_settings.xml
servers: '[{ "id": "github-packages-compas", "username": "OWNER", "password": "${{ secrets.GITHUB_TOKEN }}" }]'
- name: Build Native with Maven
- name: Build with Maven (Pull Request)
if: ${{ github.event_name == 'pull_request' }}
run: ./mvnw -s custom_maven_settings.xml -B -Pnative clean verify
- name: Build with Maven
run: ./mvnw -s custom_maven_settings.xml -B -Pnative-image clean verify
- name: Build with Maven (Push)
if: ${{ github.event_name == 'push' }}
run: ./mvnw -s custom_maven_settings.xml -B clean verify
4 changes: 2 additions & 2 deletions .github/workflows/release-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Release Project

on:
release:
types: [released]
types: [ released ]

jobs:
push_to_registry:
Expand Down Expand Up @@ -57,6 +57,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy with Maven to GitHub Packages and Docker Hub
run: ./mvnw -B -s custom_maven_settings.xml -Prelease,native clean deploy
run: ./mvnw -B -s custom_maven_settings.xml -Pnative-image,release clean deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
55 changes: 49 additions & 6 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,50 @@ SPDX-License-Identifier: Apache-2.0

<profiles>
<profile>
<id>native</id>
<id>jvm-image</id>

<properties>
<!-- Make a Docker Image, so the integration tests will be executed against the container -->
<quarkus.container-image.build>true</quarkus.container-image.build>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>
org.jboss.logmanager.LogManager
</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

<profile>
<id>native-image</id>

<properties>
<!-- Make a Docker Image, so the integration tests will be executed against the container -->
<quarkus.container-image.build>true</quarkus.container-image.build>

<quarkus.package.type>native</quarkus.package.type>
<quarkus.native.container-build>true</quarkus.native.container-build> <!-- Allows for creating a Linux executable without GraalVM being installed -->
<quarkus.container-image.build>true</quarkus.container-image.build> <!-- Also make a Docker Image, so the native test will be executed against the container -->
<!-- Allows for creating a Linux executable without GraalVM being installed -->
<quarkus.native.container-build>true</quarkus.native.container-build>
</properties>

<build>
Expand All @@ -163,8 +201,11 @@ SPDX-License-Identifier: Apache-2.0
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<native.image.path>
${project.build.directory}/${project.build.finalName}-runner
</native.image.path>
<java.util.logging.manager>org.jboss.logmanager.LogManager
</java.util.logging.manager>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
</configuration>
Expand All @@ -190,8 +231,10 @@ SPDX-License-Identifier: Apache-2.0
<id>release</id>

<properties>
<!-- Properties only used for publishing a native docker image (default to Docker Hub) -->
<!-- Make a Docker Image from the component -->
<quarkus.container-image.build>true</quarkus.container-image.build>

<!-- Properties only used for publishing a native docker image (default to Docker Hub) -->
<quarkus.container-image.push>true</quarkus.container-image.push>
<quarkus.container-image.additional-tags>latest</quarkus.container-image.additional-tags>
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
class NativeHealthCheckIT extends HealthCheckTest {
class HealthCheckIT extends HealthCheckTest {
// Execute the same tests but in native mode.
}