Skip to content
Open
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
21 changes: 4 additions & 17 deletions container/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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
RUN configure.sh
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.aiops.connectors.event-template</groupId>
<artifactId>java-grpc-connector-template</artifactId>
<version>1.1-SNAPSHOT</version>
<version>1.2-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<maven.compiler.source>11</maven.compiler.source>
Expand Down