Skip to content

Commit

Permalink
[SNOW-665920] Add warnings in build script to prevent a privately bui…
Browse files Browse the repository at this point in the history
…lt jar from going to the customer (#492)

* do as i say not as i do

* change warn and mkdir docker jar folder
  • Loading branch information
sfc-gh-rcheng authored Oct 10, 2022
1 parent 9a0f05b commit 38d2cae
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions test/build_apache.sh
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,19 @@ popd
# get built image name
# only match the first line
SNOWFLAKE_PLUGIN_NAME=$(ls $SNOWFLAKE_PLUGIN_PATH | grep "$SNOWFLAKE_PLUGIN_NAME_REGEX" | head -n 1)
echo -e "\n=== built connector name: $SNOWFLAKE_PLUGIN_NAME ==="
echo -e "\nbuilt connector name: $SNOWFLAKE_PLUGIN_NAME"

# copy built connector to plugin path
mkdir -m 777 -p $KAFKA_CONNECT_PLUGIN_PATH || \
sudo mkdir -m 777 -p $KAFKA_CONNECT_PLUGIN_PATH
cp $SNOWFLAKE_PLUGIN_PATH/$SNOWFLAKE_PLUGIN_NAME $KAFKA_CONNECT_PLUGIN_PATH || true
echo -e "\n=== copied connector to $KAFKA_CONNECT_PLUGIN_PATH ==="
echo -e "copied connector to $KAFKA_CONNECT_PLUGIN_PATH"

KAFKA_CONNECT_DOCKER_JAR_PATH="$SNOWFLAKE_CONNECTOR_PATH/docker-setup/snowflake-kafka-docker/jars"
mv $SNOWFLAKE_PLUGIN_PATH/$SNOWFLAKE_PLUGIN_NAME $KAFKA_CONNECT_DOCKER_JAR_PATH || true
echo -e "\n=== copied connector to $KAFKA_CONNECT_DOCKER_JAR_PATH for docker ==="
mkdir -m 777 -p $KAFKA_CONNECT_DOCKER_JAR_PATH
cp $SNOWFLAKE_PLUGIN_PATH/$SNOWFLAKE_PLUGIN_NAME $KAFKA_CONNECT_DOCKER_JAR_PATH || true
echo -e "copied connector to $KAFKA_CONNECT_DOCKER_JAR_PATH for docker"

echo -e "\n===================================== WARNING ====================================="
echo -e "not recommended to share this jar with customer unless necessary (PrPr feature, etc)"
echo -e "absolutely do not let the customer run this jar on their production environment\n"

0 comments on commit 38d2cae

Please sign in to comment.