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

[WIP] Hermetic builds and replace dependencies with Red Hat provided ones #1167

Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
value: quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-release-135/knative-eventing-kafka-broker-dispatcher:on-pr-{{revision}}
- name: revision
value: '{{revision}}'
- name: hermetic
value: "true"
pipelineRef:
name: docker-build
taskRunTemplate: {}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
value: quay.io/redhat-user-workloads/ocp-serverless-tenant/serverless-operator-release-135/knative-eventing-kafka-broker-receiver:on-pr-{{revision}}
- name: revision
value: '{{revision}}'
- name: hermetic
value: "true"
pipelineRef:
name: docker-build
taskRunTemplate: {}
Expand Down
380 changes: 191 additions & 189 deletions data-plane/THIRD-PARTY.txt

Large diffs are not rendered by default.

12 changes: 0 additions & 12 deletions data-plane/contract/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,4 @@
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.ec4j.maven</groupId>
<artifactId>editorconfig-maven-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
</plugins>
</build>

</project>
113 changes: 20 additions & 93 deletions data-plane/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,32 @@
<spotless.plugin.version>2.38.0</spotless.plugin.version>

<!-- dependencies version -->
<vertx.version>4.4.7</vertx.version>
<vertx.version>4.5.7.redhat-00002</vertx.version>
<vertx.community.version>4.5.7</vertx.community.version>
<cloudevents.sdk.version>4.0.0</cloudevents.sdk.version>
<micrometer.version>1.11.5</micrometer.version>
<opentelemetry.version>1.17.0</opentelemetry.version>
<jackson.version>2.14.1</jackson.version>
<protobuf.version>3.25.2</protobuf.version>
<opentelemetry.version>1.18.0.redhat-00003</opentelemetry.version>
<opentelemetry.community.version>1.18.0</opentelemetry.community.version>
<jackson.version>2.14.2.redhat-00003</jackson.version>
<protobuf.version>3.25.2.redhat-00001</protobuf.version>
<bucket4j.version>7.6.0</bucket4j.version>
<slf4j.version>2.0.9</slf4j.version>
<ch.qos.logback.version>1.4.14</ch.qos.logback.version>
<slf4j.version>2.0.7.redhat-00003</slf4j.version>
<ch.qos.logback.version>1.4.14.redhat-00001</ch.qos.logback.version>
<net.logstash.logback.encoder.version>7.2</net.logstash.logback.encoder.version>
<assertj.version>3.26.0</assertj.version>
<awaitility.version>4.2.0</awaitility.version>
<junit.jupiter.version>5.10.1</junit.jupiter.version>
<mokito.junit.jupiter.version>5.12.0</mokito.junit.jupiter.version>
<fabric8.kubernetes.version>6.10.0</fabric8.kubernetes.version>
<kafka.version>3.7.1</kafka.version>
<fabric8.kubernetes.version>6.9.2.redhat-00002</fabric8.kubernetes.version>
<fabric8.kubernetes.test.version>6.7.2.redhat-00011</fabric8.kubernetes.test.version>
<kafka.version>3.7.0.redhat-00007</kafka.version>
<debezium.version>2.6.1.Final</debezium.version>
<jib.version>3.4.0</jib.version>
<quarkus.version>3.8.4</quarkus.version>
<quarkus.version>3.8.5.redhat-00003</quarkus.version>
<antlr.version>4.9.2
</antlr.version> <!-- Overwritting quarkus's antlr version. Reminder: antlr4-maven-plugin,antlr4-runtime, antlr4 need to have the same version -->
<palantirJavaFormat.version>2.38.0</palantirJavaFormat.version>
<jose4j.version>0.9.6</jose4j.version>
<jose4j.version>0.9.6.redhat-00001</jose4j.version>
</properties>

<modules>
Expand Down Expand Up @@ -104,8 +107,8 @@

<repositories>
<repository>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<id>sonatype</id>
<id>red-hat-ga</id>
<url>https://maven.repository.redhat.com/ga</url>
<releases>
<enabled>true</enabled>
</releases>
Expand All @@ -119,7 +122,7 @@
<dependencies>
<!-- Vertx -->
<dependency>
<groupId>io.quarkus</groupId>
<groupId>com.redhat.quarkus.platform</groupId>
<artifactId>quarkus-bom</artifactId>
<version>${quarkus.version}</version>
<type>pom</type>
Expand All @@ -140,7 +143,7 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-opentelemetry</artifactId>
<version>${vertx.version}</version>
<version>${vertx.community.version}</version>
<exclusions>
<exclusion>
<groupId>io.vertx</groupId>
Expand Down Expand Up @@ -175,7 +178,7 @@
<dependency>
<groupId>io.opentelemetry</groupId>
<artifactId>opentelemetry-extension-trace-propagators</artifactId>
<version>${opentelemetry.version}</version>
<version>${opentelemetry.community.version}</version>
</dependency>

<!-- Kubernetes -->
Expand Down Expand Up @@ -203,7 +206,7 @@
<dependency>
<groupId>io.fabric8</groupId>
<artifactId>kubernetes-server-mock</artifactId>
<version>${fabric8.kubernetes.version}</version>
<version>${fabric8.kubernetes.test.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -325,7 +328,7 @@
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-junit5</artifactId>
<version>${vertx.version}</version>
<version>${vertx.community.version}</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -460,27 +463,6 @@
</from>
</configuration>
</plugin>
<plugin>
<groupId>org.ec4j.maven</groupId>
<artifactId>editorconfig-maven-plugin</artifactId>
<version>${maven.editorconfig.plugin.version}</version>
<executions>
<execution>
<id>check</id>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<excludes>
<exclude>.dockerignore</exclude>
<exclude>config/***</exclude>
<exclude>.mvn/***</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
Expand Down Expand Up @@ -540,67 +522,12 @@
</execution>
</executions>
</plugin>
<!-- Aggregate third party licenses in THIRD-PARTY.txt -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${maven.license.plugin.version}</version>
<executions>
<execution>
<id>aggregate-download-licenses</id>
<goals>
<goal>aggregate-download-licenses</goal>
</goals>
</execution>
<execution>
<id>aggregate-add-third-party</id>
<goals>
<goal>aggregate-add-third-party</goal>
</goals>
<configuration>
<outputDirectory>${maven.multiModuleProjectDirectory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!--
Use this Plugin for headers due to https://github.com/mojohaus/license-maven-plugin/issues/112 and bad format.

To add header to all files run: `./mvnw com.mycila:license-maven-plugin:format`

-->
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>${mycila.license.plugin.version}</version>
<configuration>
<licenseSets>
<licenseSet>
<header>com/mycila/maven/plugin/license/templates/APACHE-2.txt</header>
<includes>
<include>src/**/*.java</include>
</includes>
<excludes>
<exclude>**/DataPlaneContract.java</exclude>
</excludes>
</licenseSet>
</licenseSets>
<properties>
<owner>Knative Authors</owner>
<email>[email protected]</email>
<year>2018</year>
</properties>
</configuration>
<executions>
<execution>
<id>check-license</id>
<goals>
<goal>check</goal>
</goals>
<phase>verify</phase>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.antlr</groupId>
<artifactId>antlr4-maven-plugin</artifactId>
Expand Down
34 changes: 23 additions & 11 deletions openshift/ci-operator/knative-images/event_display/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/eventing/cmd/event_display.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p vendor/knative.dev/eventing/cmd/event_display/kodata && \
go build -o /usr/bin/main ./vendor/knative.dev/eventing/cmd/event_display && \
cp -r vendor/knative.dev/eventing/cmd/event_display/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./vendor/knative.dev/eventing/cmd/event_display

FROM $GO_RUNTIME

FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG VERSION=knative-v1.15

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata

COPY --from=builder /usr/bin/main /usr/bin/event_display

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-event-display-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-event-display-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Event Display" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Event Display" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Event Display"

ENTRYPOINT ["/usr/bin/event_display"]
34 changes: 23 additions & 11 deletions openshift/ci-operator/knative-images/heartbeats/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# DO NOT EDIT! Generated Dockerfile for vendor/knative.dev/eventing/cmd/heartbeats.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p vendor/knative.dev/eventing/cmd/heartbeats/kodata && \
go build -o /usr/bin/main ./vendor/knative.dev/eventing/cmd/heartbeats && \
cp -r vendor/knative.dev/eventing/cmd/heartbeats/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./vendor/knative.dev/eventing/cmd/heartbeats

FROM $GO_RUNTIME

FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG VERSION=knative-v1.15

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata

COPY --from=builder /usr/bin/main /usr/bin/heartbeats

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-heartbeats-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-heartbeats-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Heartbeats" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Heartbeats" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Heartbeats"

ENTRYPOINT ["/usr/bin/heartbeats"]
34 changes: 23 additions & 11 deletions openshift/ci-operator/knative-images/kafka-controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,32 @@
# DO NOT EDIT! Generated Dockerfile for control-plane/cmd/kafka-controller.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p control-plane/cmd/kafka-controller/kodata && \
go build -o /usr/bin/main ./control-plane/cmd/kafka-controller && \
cp -r control-plane/cmd/kafka-controller/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./control-plane/cmd/kafka-controller

FROM $GO_RUNTIME

FROM registry.access.redhat.com/ubi8/ubi-minimal
ARG VERSION=knative-v1.15

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata

COPY --from=builder /usr/bin/main /usr/bin/kafka-controller

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-kafka-broker-kafka-controller-rhel8-container" \
name="openshift-serverless-1/eventing-kafka-broker-kafka-controller-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Kafka Controller" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Kafka Controller" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Kafka Broker Kafka Controller"

ENTRYPOINT ["/usr/bin/kafka-controller"]
Loading