Skip to content

Commit

Permalink
fix java version of docker base image being too old (#57)
Browse files Browse the repository at this point in the history
* fix java version of docker base image being too old

* add integration test to verify that containerized app launches

* sonar fixes

* incorporate review feedback
  • Loading branch information
arov00 authored Mar 28, 2024
1 parent a3c67d5 commit 4f9f306
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-aggregator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: mvn -B clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=spoud_kafka-cost-control
run: mvn -B clean verify org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=spoud_kafka-cost-control -Pfailsafe

- name: Upload artifacts
uses: actions/upload-artifact@v4
Expand Down
6 changes: 5 additions & 1 deletion aggregator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<skipITs>true</skipITs>
<skipITs>false</skipITs>
<quarkus.platform.artifact-id>quarkus-bom</quarkus.platform.artifact-id>
<quarkus.platform.group-id>io.quarkus.platform</quarkus.platform.group-id>
<quarkus.platform.version>3.8.3</quarkus.platform.version>
Expand Down Expand Up @@ -82,6 +82,10 @@
<groupId>io.quarkus</groupId>
<artifactId>quarkus-smallrye-reactive-messaging-kafka</artifactId>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-container-image-docker</artifactId>
</dependency>
<dependency>
<groupId>io.confluent</groupId>
<artifactId>kafka-avro-serializer</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion aggregator/src/main/docker/Dockerfile.jvm
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
# accessed directly. (example: "foo.example.com,bar.example.com")
#
###
FROM registry.access.redhat.com/ubi8/openjdk-17:1.18
FROM registry.access.redhat.com/ubi8/openjdk-21:1.18

ENV LANGUAGE='en_US:en'

Expand Down
3 changes: 2 additions & 1 deletion aggregator/src/main/resources/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@ quarkus:
level: WARN
"io.spoud.kcc":
level: DEBUG

container-image:
build: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
package io.spoud.kcc.aggregator.stream;

import io.quarkus.test.junit.QuarkusIntegrationTest;
import org.junit.jupiter.api.Test;

@QuarkusIntegrationTest
class AppStartsTestIT {
@Test
void should_start_in_container() {
// no assertion, just make sure the application is able to launch inside the container
}
}

0 comments on commit 4f9f306

Please sign in to comment.