Skip to content

Commit

Permalink
Merge pull request #220 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 82769ef + 430d547 commit c415905
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 30 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: [ "[3.0,)" ]
- dependency-name: com.sun.xml.bind:jaxb-impl
versions: [ "[3.0,)" ]

- package-ecosystem: "docker"
directory: "/app/src/main/docker/"
schedule:
interval: "daily"
open-pull-requests-limit: 5
8 changes: 4 additions & 4 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,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 -P native 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
8 changes: 4 additions & 4 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:
release_project:
Expand All @@ -19,9 +19,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 @@ -58,6 +58,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 -P release,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 @@ -59,7 +59,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: |
./mvnw -s custom_maven_settings.xml -B -P sonar \
./mvnw -s custom_maven_settings.xml -B -Psonar \
-Dsonar.projectKey=com-pas_compas-scl-data-service \
-Dsonar.organization=com-pas \
-Dsonar.host.url=https://sonarcloud.io \
Expand Down
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-scl-data-service/Maven%20Build?logo=GitHub>)](https://github.com/com-pas/compas-scl-data-service/actions?query=workflow%3A%22Maven+Build%22)
[![REUSE status](https://api.reuse.software/badge/github.com/com-pas/compas-scl-data-service)](https://api.reuse.software/info/github.com/com-pas/compas-scl-data-service)
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=com-pas_compas-scl-data-service&metric=alert_status)](https://sonarcloud.io/dashboard?id=com-pas_compas-scl-data-service)
[![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-scl-data-service%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-scl-data-service
Expand Down
76 changes: 63 additions & 13 deletions app/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,15 @@ SPDX-License-Identifier: Apache-2.0
<configuration>
<properties>
<quarkus.profile>prod-postgresql</quarkus.profile>
<quarkus.package.output-directory>postgresql-quarkus-app</quarkus.package.output-directory>
<quarkus.docker.dockerfile-jvm-path>src/main/docker/Dockerfile-postgresql.jvm</quarkus.docker.dockerfile-jvm-path>
<quarkus.docker.dockerfile-native-path>src/main/docker/Dockerfile-postgresql.native</quarkus.docker.dockerfile-native-path>
<quarkus.package.output-directory>postgresql-quarkus-app
</quarkus.package.output-directory>
<quarkus.docker.dockerfile-jvm-path>src/main/docker/Dockerfile-postgresql.jvm
</quarkus.docker.dockerfile-jvm-path>
<quarkus.docker.dockerfile-native-path>src/main/docker/Dockerfile-postgresql.native
</quarkus.docker.dockerfile-native-path>
<quarkus.container-image.tag>${project.version}-postgresql</quarkus.container-image.tag>
<quarkus.container-image.additional-tags>latest-postgresql</quarkus.container-image.additional-tags>
<quarkus.container-image.additional-tags>latest-postgresql
</quarkus.container-image.additional-tags>
</properties>
</configuration>
</execution>
Expand All @@ -184,10 +188,13 @@ SPDX-License-Identifier: Apache-2.0
<properties>
<quarkus.profile>prod-basex</quarkus.profile>
<quarkus.package.output-directory>basex-quarkus-app</quarkus.package.output-directory>
<quarkus.docker.dockerfile-jvm-path>src/main/docker/Dockerfile-basex.jvm</quarkus.docker.dockerfile-jvm-path>
<quarkus.docker.dockerfile-native-path>src/main/docker/Dockerfile-basex.native</quarkus.docker.dockerfile-native-path>
<quarkus.docker.dockerfile-jvm-path>src/main/docker/Dockerfile-basex.jvm
</quarkus.docker.dockerfile-jvm-path>
<quarkus.docker.dockerfile-native-path>src/main/docker/Dockerfile-basex.native
</quarkus.docker.dockerfile-native-path>
<quarkus.container-image.tag>${project.version}-basex</quarkus.container-image.tag>
<quarkus.container-image.additional-tags>latest-basex</quarkus.container-image.additional-tags>
<quarkus.container-image.additional-tags>latest-basex
</quarkus.container-image.additional-tags>
</properties>
</configuration>
</execution>
Expand All @@ -209,12 +216,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 @@ -232,8 +277,11 @@ SPDX-License-Identifier: Apache-2.0
</goals>
<configuration>
<systemPropertyVariables>
<native.image.path>${project.build.directory}/basex-quarkus-app/${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}/basex-quarkus-app/${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 @@ -259,8 +307,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>
</properties>
</profile>
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/docker/Dockerfile-basex.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-basex.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
2 changes: 1 addition & 1 deletion app/src/main/docker/Dockerfile-postgresql.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-postgresql.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.
}
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>
<jaxb-impl.version>2.3.6</jaxb-impl.version>
<microprofile-openapi-api.version>3.0</microprofile-openapi-api.version>
<slf4j.version>1.7.36</slf4j.version>
Expand Down
6 changes: 6 additions & 0 deletions repository-basex/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ SPDX-License-Identifier: Apache-2.0
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
</dependency>

<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<scope>provided</scope>
</dependency>

<!-- Test Dependencies -->
<dependency>
Expand Down

0 comments on commit c415905

Please sign in to comment.