Skip to content

Commit

Permalink
fix(testing): follow redirect when downloading ZK and use https
Browse files Browse the repository at this point in the history
http mirror now redirects to https one
  • Loading branch information
StephenSorriaux committed Feb 26, 2024
1 parent 4ed8a30 commit b4155ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ensure-zookeeper-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ ZOOKEEPER_VERSION=${ZOOKEEPER_VERSION:-3.4.14}
ZOOKEEPER_PATH="$ZOO_BASE_DIR/$ZOOKEEPER_VERSION"
ZOOKEEPER_PREFIX=${ZOOKEEPER_PREFIX}
ZOOKEEPER_SUFFIX=${ZOOKEEPER_SUFFIX}
ZOO_MIRROR_URL="http://archive.apache.org/dist"
ZOO_MIRROR_URL="https://archive.apache.org/dist"


function download_zookeeper(){
mkdir -p $ZOO_BASE_DIR
cd $ZOO_BASE_DIR
ZOOKEEPER_DOWNLOAD_URL=${ZOO_MIRROR_URL}/zookeeper/zookeeper-${ZOOKEEPER_VERSION}/${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX}.tar.gz
echo "Will download ZK from ${ZOOKEEPER_DOWNLOAD_URL}"
(curl --silent -C - $ZOOKEEPER_DOWNLOAD_URL | tar -zx) || echo "Failed downloading ZK from ${ZOOKEEPER_DOWNLOAD_URL}"
(curl --silent -L -C - $ZOOKEEPER_DOWNLOAD_URL | tar -zx) || (echo "Failed downloading ZK from ${ZOOKEEPER_DOWNLOAD_URL}" && exit 1)
mv ${ZOOKEEPER_PREFIX}zookeeper-${ZOOKEEPER_VERSION}${ZOOKEEPER_SUFFIX} $ZOOKEEPER_VERSION
chmod a+x $ZOOKEEPER_PATH/bin/zkServer.sh
}
Expand Down

0 comments on commit b4155ea

Please sign in to comment.