This is an automated email from the ASF dual-hosted git repository. lhotari pushed a commit to branch branch-3.0 in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/branch-3.0 by this push: new df2ebbcba13 [improve][test] Refactor the way way pulsar-io-debezium-oracle nar file is patched when building the test image (#24586) df2ebbcba13 is described below commit df2ebbcba1379bbf3d17a8604150571cf12a458f Author: Lari Hotari <lhot...@users.noreply.github.com> AuthorDate: Wed Jul 30 21:26:12 2025 +0300 [improve][test] Refactor the way way pulsar-io-debezium-oracle nar file is patched when building the test image (#24586) (cherry picked from commit b2f277d7900b4b40187bc5a7f5ba2d419ff0886d) --- .../docker-images/latest-version-image/Dockerfile | 38 ++++++++++++++-------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/tests/docker-images/latest-version-image/Dockerfile b/tests/docker-images/latest-version-image/Dockerfile index 9cb1c576c5a..9c3ea8fdf4e 100644 --- a/tests/docker-images/latest-version-image/Dockerfile +++ b/tests/docker-images/latest-version-image/Dockerfile @@ -29,6 +29,29 @@ RUN cd /go/src/github.com/apache/pulsar/pulsar-function-go/examples && go instal # Reference pulsar-all to copy connectors from there FROM apachepulsar/pulsar-all:latest as pulsar-all + +# patch Oracle Debezium Connector nar file to include Oracle JDBC dependencies +FROM apachepulsar/pulsar-all:latest as oracle-jdbc-builder + +USER root +WORKDIR / + +RUN OJDBC_VERSION="19.3.0.0" && \ + OJDBC_BASE_URL="https://repo1.maven.org/maven2/com/oracle/ojdbc" && \ + DEPS_DIR="META-INF/bundled-dependencies" && \ + OJDBC_ARTIFACTS="ojdbc8 ucp oraclepki osdt_cert osdt_core simplefan orai18n xdb xmlparserv2" && \ + cd / && rm -rf "$DEPS_DIR" && mkdir -p "$DEPS_DIR" && \ + cd "$DEPS_DIR" && \ + for ojdbc_artifact in $OJDBC_ARTIFACTS; do \ + ojdbc_jar_file="${ojdbc_artifact}-${OJDBC_VERSION}.jar" && \ + ojdbc_download_url="${OJDBC_BASE_URL}/${ojdbc_artifact}/${OJDBC_VERSION}/${ojdbc_jar_file}" && \ + echo "Downloading $ojdbc_jar_file from $ojdbc_download_url" && \ + curl -sSL --retry 5 --retry-delay 1 --retry-max-time 30 "${ojdbc_download_url}" -o "${ojdbc_jar_file}" && \ + [ -f "${ojdbc_jar_file}" ] || (echo "Failed to download ${ojdbc_jar_file}" && exit 1); \ + done && \ + cd / && \ + jar uvf /pulsar/connectors/pulsar-io-debezium-oracle-*.nar $DEPS_DIR/*.jar >&2 + ######################################## ###### Main image build ######################################## @@ -93,19 +116,8 @@ COPY --from=pulsar-all /pulsar/connectors/pulsar-io-rabbitmq-*.nar /pulsar/conne COPY --from=pulsar-all /pulsar/connectors/pulsar-io-batch-data-generator-*.nar /pulsar/connectors/ COPY --from=pulsar-all /pulsar/connectors/pulsar-io-kinesis-*.nar /pulsar/connectors/ -# download Oracle JDBC driver for Oracle Debezium Connector tests -RUN mkdir -p META-INF/bundled-dependencies -RUN cd META-INF/bundled-dependencies && curl -sSLO https://search.maven.org/remotecontent?filepath=com/oracle/ojdbc/ojdbc8/19.3.0.0/ojdbc8-19.3.0.0.jar -RUN cd META-INF/bundled-dependencies && curl -sSLO https://search.maven.org/remotecontent?filepath=com/oracle/ojdbc/ucp/19.3.0.0/ucp-19.3.0.0.jar -RUN cd META-INF/bundled-dependencies && curl -sSLO https://search.maven.org/remotecontent?filepath=com/oracle/ojdbc/oraclepki/19.3.0.0/oraclepki-19.3.0.0.jar -RUN cd META-INF/bundled-dependencies && curl -sSLO https://search.maven.org/remotecontent?filepath=com/oracle/ojdbc/osdt_cert/19.3.0.0/osdt_cert-19.3.0.0.jar -RUN cd META-INF/bundled-dependencies && curl -sSLO https://search.maven.org/remotecontent?filepath=com/oracle/ojdbc/osdt_core/19.3.0.0/osdt_core-19.3.0.0.jar -RUN cd META-INF/bundled-dependencies && curl -sSLO https://search.maven.org/remotecontent?filepath=com/oracle/ojdbc/simplefan/19.3.0.0/simplefan-19.3.0.0.jar -RUN cd META-INF/bundled-dependencies && curl -sSLO https://search.maven.org/remotecontent?filepath=com/oracle/ojdbc/orai18n/19.3.0.0/orai18n-19.3.0.0.jar -RUN cd META-INF/bundled-dependencies && curl -sSLO https://search.maven.org/remotecontent?filepath=com/oracle/ojdbc/xdb/19.3.0.0/xdb-19.3.0.0.jar -RUN cd META-INF/bundled-dependencies && curl -sSLO https://search.maven.org/remotecontent?filepath=com/oracle/ojdbc/xmlparserv2/19.3.0.0/xmlparserv2-19.3.0.0.jar - -RUN jar uf connectors/pulsar-io-debezium-oracle-*.nar META-INF/bundled-dependencies/ojdbc8-19.3.0.0.jar META-INF/bundled-dependencies/ucp-19.3.0.0.jar META-INF/bundled-dependencies/oraclepki-19.3.0.0.jar META-INF/bundled-dependencies/osdt_cert-19.3.0.0.jar META-INF/bundled-dependencies/osdt_core-19.3.0.0.jar META-INF/bundled-dependencies/simplefan-19.3.0.0.jar META-INF/bundled-dependencies/orai18n-19.3.0.0.jar META-INF/bundled-dependencies/xdb-19.3.0.0.jar META-INF/bundled-dependencies/x [...] +# Copy patched Oracle Debezium Connector nar file which includes Oracle JDBC dependencies +COPY --from=oracle-jdbc-builder /pulsar/connectors/pulsar-io-debezium-oracle-*.nar /pulsar/connectors/ CMD bash