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

Update to Quarkus 3 #51

Merged
merged 7 commits into from
Mar 22, 2024
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
96 changes: 96 additions & 0 deletions .github/workflows/merge-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
#
# Copyright (C) 2022-2023 Red Hat, Inc. (https://github.com/Commonjava/indy-tracking-service)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: Merge / Push Build

on: [push]

jobs:
publish-snapshot:
name: build & push image

runs-on: ubuntu-latest

permissions:
contents: read
packages: write

env:
MAVEN_OPTS: "-Xmx4096m -Xms2048m -XX:MaxMetaspaceSize=4096m -Xss8m"

steps:
- uses: actions/checkout@v4

- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'temurin'
architecture: x64
java-version: 11

- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v14
with:
repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'

- name: "Maven Verify"
if: ${{ github.event.repository.fork == true }}
run: mvn -B -e verify

- name: "Maven Build"
if: ${{ github.event.repository.fork == false }}
run: mvn -B -e clean install

- name: Checkout tools repo
uses: actions/checkout@v4
with:
repository: Commonjava/commonjava-images
path: commonjava-images

- name: Locate artifacts
id: locate-artifacts
run: |
tarball=$(ls -d $PWD/target/*-runner.jar)
cp "$tarball" "commonjava-images/indy-tracking-service/indy-tracking-service-runner.jar"

- name: Log in to Quay.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
registry: quay.io

- name: Buildah build
id: buildah-build
uses: redhat-actions/buildah-build@v2
with:
image: indy-tracking-service
tags: ${{ github.ref_name }}
platforms: linux/amd64
containerfiles: |
commonjava-images/indy-tracking-service/actions.Dockerfile
context: commonjava-images/indy-tracking-service/

- name: Push To quay.io
id: push-to-quay
uses: redhat-actions/push-to-registry@v2
with:
image: ${{ steps.buildah-build.outputs.image }}
tags: ${{ steps.buildah-build.outputs.tags }}
registry: quay.io/factory2
44 changes: 44 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
#
# Copyright (C) 2022-2023 Red Hat, Inc. (https://github.com/Commonjava/indy-tracking-service)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

# This workflow will build a Java project with Maven
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven

name: PR Build

on: [pull_request]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'

- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v14
with:
repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'

- name: Build with Maven
run: mvn -B -e verify
5 changes: 5 additions & 0 deletions .github/workflows/unittests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ jobs:
distribution: 'temurin'
cache: maven

- name: maven-settings-xml-action
uses: whelk-io/maven-settings-xml-action@v14
with:
repositories: '[{ "id": "sonatype", "url": "https://oss.sonatype.org/content/repositories/snapshots/", "releases": {"enabled": "false"}, "snapshots": {"enabled": "true" }}]'

- name: 🚀 Jacoco Coverage Report for JDK ${{ matrix.jdk-version }}
run: mvn clean test jacoco:report --no-transfer-progress

Expand Down
84 changes: 8 additions & 76 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
<parent>
<groupId>org.commonjava</groupId>
<artifactId>service-parent</artifactId>
<version>2</version>
<version>5-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.commonjava.indy.service</groupId>
<artifactId>indy-tracking-service</artifactId>
<version>1.0.5-SNAPSHOT</version>
<version>2.0-SNAPSHOT</version>
<name>Indy :: Service :: Tracking</name>
<url>https://github.com/Commonjava/indy-tracking-service</url>
<description>Indy Tracking Service</description>
Expand All @@ -41,17 +41,10 @@
<properties>
<apiVersion>1</apiVersion>
<projectEmail>https://github.com/Commonjava/indy-tracking-service</projectEmail>

<atlas.version>1.1.1</atlas.version>
<eventmodel.version>1.5</eventmodel.version>
<indysecurity.verison>1.0</indysecurity.verison>

<indysecurity.verison>1.2-SNAPSHOT</indysecurity.verison>
<cassandra.version>3.11.3</cassandra.version>
<agroal.version>2.0</agroal.version>

<!--
<honeycomb.otel.version>1.0.0</honeycomb.otel.version>
-->
</properties>

<dependencies>
Expand All @@ -70,6 +63,7 @@
<artifactId>indy-security</artifactId>
<version>${indysecurity.verison}</version>
</dependency>

<!-- quarkus deps start -->
<dependency>
<groupId>io.quarkus</groupId>
Expand Down Expand Up @@ -120,6 +114,7 @@
<artifactId>quarkus-oidc</artifactId>
</dependency>

<!-- quarkus test deps -->
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-junit5</artifactId>
Expand Down Expand Up @@ -165,7 +160,7 @@
<artifactId>awaitility</artifactId>
<scope>test</scope>
</dependency>
<!-- quarkus deps end -->

<!-- quarkus otel deps -->
<dependency>
<groupId>io.quarkus</groupId>
Expand All @@ -187,15 +182,7 @@
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-sdk-extension-jaeger-remote-sampler</artifactId>
</dependency>
<!-- for honeycomb otel usage, see: https://docs.honeycomb.io/getting-data-in/opentelemetry/java-distro/ -->
<!--
<dependency>
<groupId>io.honeycomb</groupId>
<artifactId>honeycomb-opentelemetry-sdk</artifactId>
<version>${honeycomb.otel.version}</version>
</dependency>
-->
<!-- quarkus otel deps end -->

<!-- for access other services -->
<dependency>
<groupId>io.quarkus</groupId>
Expand All @@ -218,12 +205,6 @@
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<version>2.14.0</version>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.ws.rs</groupId>
<artifactId>jboss-jaxrs-api_2.1_spec</artifactId>
<version>2.0.2.Final</version>
</dependency>
<dependency>
<groupId>org.commonjava.atlas</groupId>
Expand All @@ -240,25 +221,9 @@
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.agroal</groupId>
<artifactId>agroal-api</artifactId>
<version>${agroal.version}</version>
</dependency>
<dependency>
<groupId>io.agroal</groupId>
<artifactId>agroal-pool</artifactId>
<version>${agroal.version}</version>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.5.1</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
</dependency>
<dependency>
<groupId>com.datastax.cassandra</groupId>
Expand All @@ -273,49 +238,16 @@
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.5.13</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.11.0</version>
</dependency>
<dependency>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-interpolation</artifactId>
<version>1.26</version>
</dependency>
<dependency>
<groupId>org.cassandraunit</groupId>
<artifactId>cassandra-unit</artifactId>
<version>3.11.2.0</version>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
</exclusion>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
<classifier>linux-x86_64</classifier>
</dependency>
<dependency>
<groupId>org.commonjava.util</groupId>
<artifactId>http-testserver-core</artifactId>
<version>2.0</version>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand All @@ -334,7 +266,7 @@
</configuration>
</plugin>
<plugin>
<groupId>io.quarkus</groupId>
<groupId>io.quarkus.platform</groupId>
<artifactId>quarkus-maven-plugin</artifactId>
</plugin>
<plugin>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.enterprise.context.ApplicationScoped;
import javax.inject.Inject;
import jakarta.enterprise.context.ApplicationScoped;
import jakarta.inject.Inject;
import java.net.MalformedURLException;
import java.util.concurrent.CompletionStage;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.annotation.Priority;
import javax.inject.Inject;
import javax.ws.rs.Priorities;
import javax.ws.rs.client.ClientRequestContext;
import javax.ws.rs.client.ClientRequestFilter;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.ext.Provider;
import jakarta.annotation.Priority;
import jakarta.inject.Inject;
import jakarta.ws.rs.Priorities;
import jakarta.ws.rs.client.ClientRequestContext;
import jakarta.ws.rs.client.ClientRequestFilter;
import jakarta.ws.rs.core.HttpHeaders;
import jakarta.ws.rs.ext.Provider;
import java.io.IOException;

@Provider
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Response;
import java.io.File;
import java.util.Set;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
import org.eclipse.microprofile.rest.client.annotation.RegisterProvider;
import org.eclipse.microprofile.rest.client.inject.RegisterRestClient;

import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.core.Response;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.core.Response;

@Path( "/api/admin/maint/content" )
@RegisterRestClient( configKey = "content-service-api" )
Expand Down
Loading
Loading