From 9a825f5ff7006fd97fc7e7f5b9fa801e18fd9452 Mon Sep 17 00:00:00 2001 From: Steven Hung Date: Thu, 27 Jul 2023 10:26:38 -0400 Subject: [PATCH 1/2] Update open jdk issue Signed-off-by: Steven Hung --- CHANGELOG.md | 3 +++ Makefile | 2 +- container/Dockerfile | 21 ++++----------------- pom.xml | 2 +- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 223d4eb..d756770 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +# 1.2-SNAPSHOT (2023-07-26) +- Updated the way Java 11 was being pulled in. There was a breaking change that caused the currently JDK to throw the error `The exception: Exception in thread "main" java.lang.Error: java.io.FileNotFoundException: /usr/lib/jvm/java-11-openjdk-11.0.20.0.8-2.el8.x86_64/lib/tzdb.dat (No such file or directory) ` during build time. To fix this problem, the base image `registry.access.redhat.com/ubi8/openjdk-11:latest` is used, which also has its own Maven + # 1.1-SNAPSHOT (2023-07-05) - Update `connectors-sdk` to `1.4.18` - In 4.1.x CP4WAIOPs releases, a newly added connector has a conflicting topic `topology-connector-report`. As a result, this topic is no longer in the `prereqs` for the topic. As a result, `topics.yaml` is commented out and comments are added as to how this file could be used diff --git a/Makefile b/Makefile index 81d3454..2949835 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -REGISTRY ?= PLACEHOLDER_REGISTRY_ADDRESS +REGISTRY ?= hyc-connector-framework-team-integrations-docker-local.artifactory.swg-devops.com TAG ?= latest DOCKER_IMAGE := $(REGISTRY)/cp/aiopsedge/java-grpc-connector-template:$(TAG) diff --git a/container/Dockerfile b/container/Dockerfile index f71ac5b..60c964d 100644 --- a/container/Dockerfile +++ b/container/Dockerfile @@ -1,27 +1,14 @@ ## TODO: Add license ## Build application -FROM registry.access.redhat.com/ubi8/ubi-minimal:latest as builder +FROM registry.access.redhat.com/ubi8/openjdk-11:latest as builder WORKDIR /build -RUN microdnf update && \ - microdnf install -y procps-ng java-11-openjdk tar && \ - microdnf clean all - -# Use https://archive.apache.org/dist/maven/maven-3/, which has older versions that some mirrors do not have -RUN curl -s -o /tmp/mvn.tar.gz https://archive.apache.org/dist/maven/maven-3/3.9.0/binaries/apache-maven-3.9.0-bin.tar.gz && \ - mkdir /tmp/mvn && \ - tar xfz /tmp/mvn.tar.gz -C /tmp/mvn && \ - mv /tmp/mvn/apache-maven-3.9.0 /usr/local/maven - -ENV PATH="/usr/local/maven/bin:${PATH}" -ENV MVN_HOME=/usr/local/maven - # Download and cache dependencies beforehand -COPY pom.xml /build/connector/ +COPY --chown=jboss:jboss pom.xml /build/connector/ RUN cd /build/connector && mvn dependency:go-offline -B -COPY src /build/connector/src +COPY --chown=jboss:jboss . /build/connector RUN cd /build/connector && rm -r src/main/liberty && mvn install ## Final image @@ -49,4 +36,4 @@ COPY --from=builder --chown=1001:0 /build/connector/target/java-grpc-connector- # ENV SEC_TLS_TRUSTDEFAULTCERTS=true # ENV SEC_IMPORT_K8S_CERTS=true -RUN configure.sh \ No newline at end of file +RUN configure.sh diff --git a/pom.xml b/pom.xml index 151348e..ca9e4c4 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ 4.0.0 com.ibm.aiops.connectors.event-template java-grpc-connector-template - 1.1-SNAPSHOT + 1.2-SNAPSHOT war 11 From 52971c03001c53a7a99f33252e05d658547d7ebf Mon Sep 17 00:00:00 2001 From: Steven Hung Date: Thu, 27 Jul 2023 10:34:03 -0400 Subject: [PATCH 2/2] Fix image --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2949835..81d3454 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -REGISTRY ?= hyc-connector-framework-team-integrations-docker-local.artifactory.swg-devops.com +REGISTRY ?= PLACEHOLDER_REGISTRY_ADDRESS TAG ?= latest DOCKER_IMAGE := $(REGISTRY)/cp/aiopsedge/java-grpc-connector-template:$(TAG)