Skip to content

Commit

Permalink
Merge pull request #98 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 c5e27e7 + 61cb602 commit a0577cf
Show file tree
Hide file tree
Showing 10 changed files with 72 additions and 22 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 @@ -38,7 +38,7 @@ jobs:
restore-keys: ${{ runner.os }}-m2

- name: Set up JDK 1.11
uses: actions/setup-java@v3.2.0
uses: actions/setup-java@v3.3.0
with:
distribution: 'zulu'
java-version: '11'
Expand All @@ -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
10 changes: 5 additions & 5 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 All @@ -18,9 +18,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 All @@ -42,7 +42,7 @@ jobs:
# Extra the tagname form the git reference, value of GITHUB_REF will be something like refs/tags/<tag_name>.
run: echo "##[set-output name=tagname;]$(echo ${GITHUB_REF##*/})"
- name: Set up JDK 1.11
uses: actions/setup-java@v3.2.0
uses: actions/setup-java@v3.3.0
with:
distribution: 'zulu'
java-version: '11'
Expand All @@ -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 }}
2 changes: 1 addition & 1 deletion .github/workflows/sonarcloud-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
fetch-depth: 0

- name: Set up JDK 1.11
uses: actions/setup-java@v3.2.0
uses: actions/setup-java@v3.3.0
with:
distribution: 'zulu'
java-version: '11'
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ SPDX-License-Identifier: Apache-2.0
[![Maven Build Github Action Status](<https://img.shields.io/github/workflow/status/com-pas/compas-scl-auto-alignment/Build%20Project?logo=GitHub>)](https://github.com/com-pas/compas-scl-auto-alignment/actions?query=workflow%3A%22Build+Project%22)
[![REUSE status](https://api.reuse.software/badge/github.com/com-pas/compas-scl-auto-alignment)](https://api.reuse.software/info/github.com/com-pas/compas-scl-auto-alignment)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com-pas_compas-scl-auto-alignment&metric=alert_status)](https://sonarcloud.io/dashboard?id=com-pas_compas-scl-auto-alignment)
[![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-scl-auto-alignment
Expand Down
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
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 @@ -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.
}
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,9 @@ SPDX-License-Identifier: Apache-2.0
<surefire-plugin.version>3.0.0-M6</surefire-plugin.version>
<sonarqube-plugin.version>3.2.0</sonarqube-plugin.version>

<compas.core.version>0.8.0</compas.core.version>
<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>
<slf4j.version>1.7.36</slf4j.version>
<powsybl.sld.version>2.10.0</powsybl.sld.version>
<gson.version>2.9.0</gson.version>
Expand Down

0 comments on commit a0577cf

Please sign in to comment.