Skip to content

Commit

Permalink
DBZ-7551 avoid overriding MAVEN_DEP_DESTINATION in connect image
Browse files Browse the repository at this point in the history
By relying on the KAFKA_CONNECT_PLUGINS_DIR in the
docker-maven-download.sh (connect-base image), overwriting the
MAVEN_DEP_DESTINATION can be avoided in the connect image.

This prevents the need to revert this override in decendant images,
allowing for a clear distinction between KAFKA_CONNECT_PLUGINS_DIR,
MAVEN_DEP_DESTINATION and EXTERNAL_LIBS_DIR.
  • Loading branch information
razvanz authored and jpechane committed Feb 28, 2024
1 parent 3128524 commit 3e5402f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions connect-base/2.6/docker-maven-download.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set -e
MAVEN_REPO_CENTRAL=${MAVEN_REPO_CENTRAL:-"https://repo1.maven.org/maven2"}
MAVEN_REPOS_ADDITIONAL=${MAVEN_REPOS_ADDITIONAL:-""}
MAVEN_REPO_CONFLUENT=${MAVEN_REPO_CONFLUENT:-"https://packages.confluent.io/maven"}
KAFKA_CONNECT_PLUGINS_DIR=${KAFKA_CONNECT_PLUGINS_DIR}
MAVEN_DEP_DESTINATION=${MAVEN_DEP_DESTINATION}
EXTERNAL_LIBS_DIR=${EXTERNAL_LIBS_DIR}

Expand Down Expand Up @@ -49,7 +50,7 @@ maven_confluent_dep() {

maven_debezium_plugin() {
maven_dep $MAVEN_REPO_CENTRAL "io/debezium" "debezium-connector-$1" $2 "debezium-connector-$1-$2-plugin.tar.gz" $3
tar -xzf "$DOWNLOAD_FILE" -C "$MAVEN_DEP_DESTINATION" && rm "$DOWNLOAD_FILE"
tar -xzf "$DOWNLOAD_FILE" -C "$KAFKA_CONNECT_PLUGINS_DIR" && rm "$DOWNLOAD_FILE"
}

maven_debezium_optional() {
Expand All @@ -71,7 +72,7 @@ maven_debezium_additional_plugin() {
else
maven_dep "${!REPO}" "io/debezium" "debezium-connector-$2" $3 "debezium-connector-$2-$3-plugin.tar.gz" $4
fi
tar -xzf "$DOWNLOAD_FILE" -C "$MAVEN_DEP_DESTINATION" && rm "$DOWNLOAD_FILE"
tar -xzf "$DOWNLOAD_FILE" -C "$KAFKA_CONNECT_PLUGINS_DIR" && rm "$DOWNLOAD_FILE"
}

maven_apicurio_converter() {
Expand Down
1 change: 0 additions & 1 deletion connect/2.6/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ LABEL maintainer="Debezium Community"
ENV DEBEZIUM_VERSION="2.6.0.Alpha2" \
MAVEN_REPO_CENTRAL="" \
MAVEN_REPOS_ADDITIONAL="" \
MAVEN_DEP_DESTINATION=$KAFKA_CONNECT_PLUGINS_DIR \
MONGODB_MD5=ad4342094f6e4f3202d4e915462900c0 \
MYSQL_MD5=8593cc4c0770e086432647ecbbe7ccc2 \
POSTGRES_MD5=218ce3145f4e919df9bcd9c3cbd5c4da \
Expand Down

0 comments on commit 3e5402f

Please sign in to comment.