Skip to content

Commit

Permalink
Merge pull request #230 from com-pas/develop
Browse files Browse the repository at this point in the history
New release
  • Loading branch information
Dennis Labordus authored May 16, 2022
2 parents 5dbe2ec + faed843 commit 52bf518
Show file tree
Hide file tree
Showing 9 changed files with 69 additions and 20 deletions.
6 changes: 6 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,9 @@ updates:
versions: [ "[7.0,)" ]
- dependency-name: org.glassfish:jakarta.el
versions: [ "[4.0,)" ]

- package-ecosystem: "docker"
directory: "/app/src/main/docker/"
schedule:
interval: "daily"
open-pull-requests-limit: 5
10 changes: 5 additions & 5 deletions .github/workflows/build-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Cache Docker Register
uses: actions/cache@v3
with:
Expand All @@ -48,11 +48,11 @@ 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' }}
# See issue https://github.com/com-pas/compas-cim-mapping/issues/218
# run: ./mvnw -s custom_maven_settings.xml -B -Pnative clean verify
run: ./mvnw -s custom_maven_settings.xml -B clean verify
- name: Build with Maven
# run: ./mvnw -s custom_maven_settings.xml -B -Pnative-image clean verify
run: ./mvnw -s custom_maven_settings.xml -B -Pjvm-image clean verify
- name: Build with Maven (Push)
if: ${{ github.event_name == 'push' }}
run: ./mvnw -s custom_maven_settings.xml -B clean verify
8 changes: 4 additions & 4 deletions .github/workflows/release-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ jobs:
uses: actions/checkout@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
Expand Down Expand Up @@ -57,7 +57,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy with Maven to GitHub Packages and Docker Hub
# See issue https://github.com/com-pas/compas-cim-mapping/issues/218
# run: ./mvnw -B -s custom_maven_settings.xml -Prelease,native clean deploy
run: ./mvnw -B -s custom_maven_settings.xml -Prelease clean deploy
# run: ./mvnw -B -s custom_maven_settings.xml -Pnative-image,release clean deploy
run: ./mvnw -B -s custom_maven_settings.xml -Pjvm-image,release clean deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ SPDX-License-Identifier: Apache-2.0
[![Maven Build Github Action Status](<https://img.shields.io/github/workflow/status/com-pas/compas-cim-mapping/Maven%20Build?logo=GitHub>)](https://github.com/com-pas/compas-cim-mapping/actions?query=workflow%3A%22Maven+Build%22)
[![REUSE status](https://api.reuse.software/badge/github.com/com-pas/compas-cim-mapping)](https://api.reuse.software/info/github.com/com-pas/compas-cim-mapping)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com-pas_compas-cim-mapping&metric=alert_status)](https://sonarcloud.io/dashboard?id=com-pas_compas-cim-mapping)
[![LFX Security Status](https://img.shields.io/badge/dynamic/json?color=orange&label=LFX%20Security%20Tool&query=issues%5B%3F%28%40%5B%27repository-name%27%5D%20%3D%3D%20%27compas-cim-mapping%27%29%5D%5B%27high-open-issues%27%5D&suffix=%20High%20open%20issues&url=https%3A%2F%2Fapi.security.lfx.linuxfoundation.org%2Fv1%2Fproject%2Fe8b6fdf9-2686-44c5-bbaa-6965d04ad3e1%2Fissues)](https://security.lfx.linuxfoundation.org/#/e8b6fdf9-2686-44c5-bbaa-6965d04ad3e1/issues)
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/5925/badge)](https://bestpractices.coreinfrastructure.org/projects/5925)
[![Slack](https://raw.githubusercontent.com/com-pas/compas-architecture/master/public/LFEnergy-slack.svg)](http://lfenergy.slack.com/)

# compas-cim-mapping
Expand Down
55 changes: 49 additions & 6 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -136,12 +136,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 @@ -158,8 +196,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 @@ -185,8 +226,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
2 changes: 1 addition & 1 deletion app/src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# docker run -i --rm -p 8080:8080 -p 5005:5005 -e JAVA_ENABLE_DEBUG="true" quarkus/app-jvm
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6

ARG JAVA_PACKAGE=java-11-openjdk-headless
ARG RUN_JAVA_VERSION=1.3.8
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/docker/Dockerfile.native
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
# docker run -i --rm -p 8080:8080 quarkus/app
#
###
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.4
FROM registry.access.redhat.com/ubi8/ubi-minimal:8.6
WORKDIR /work/
RUN chown 1001 /work \
&& chmod "g+rwX" /work \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
import io.quarkus.test.junit.QuarkusIntegrationTest;

@QuarkusIntegrationTest
class NativeHealthCheckIT extends HealthCheckTest {
class HealthCheckIT extends HealthCheckTest {
// Execute the same tests but in native mode.
}
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ SPDX-License-Identifier: Apache-2.0

<compas.core.version>0.9.0</compas.core.version>

<quarkus.platform.version>2.8.2.Final</quarkus.platform.version>
<quarkus.platform.version>2.9.0.Final</quarkus.platform.version>
<microprofile-openapi-api.version>3.0</microprofile-openapi-api.version>
<slf4j.version>1.7.36</slf4j.version>
<powsybl.version>4.8.0</powsybl.version>
Expand Down

0 comments on commit 52bf518

Please sign in to comment.