From 5f53c0976ca657e467c30d3a0491accccfd2d0cc Mon Sep 17 00:00:00 2001 From: Brad Davidson Date: Mon, 21 Dec 2020 15:55:13 -0800 Subject: [PATCH] Expose failure if Traefik helm chart cannot be downloaded Signed-off-by: Brad Davidson --- scripts/download | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/download b/scripts/download index c778ecd662..ddb2be2858 100755 --- a/scripts/download +++ b/scripts/download @@ -13,6 +13,15 @@ mkdir -p ${CHARTS_DIR} curl --compressed -sfL https://github.com/k3s-io/k3s-root/releases/download/${ROOT_VERSION}/k3s-root-${ARCH}.tar | tar xf - TRAEFIK_FILE=traefik-${TRAEFIK_VERSION}.tgz -curl -sfL https://kubernetes-charts.storage.googleapis.com/${TRAEFIK_FILE} -o ${CHARTS_DIR}/${TRAEFIK_FILE} +TRAEFIK_URL=https://kubernetes-charts.storage.googleapis.com/${TRAEFIK_FILE} + +echo "Downloading Traefik Helm chart from ${TRAEFIK_URL}" +curl -sfL ${TRAEFIK_URL} -o ${CHARTS_DIR}/${TRAEFIK_FILE} +code=$? + +if [ $code -ne 0 ]; then + echo "Error: Failed to download Traefik Helm chart!" + exit $code +fi cp scripts/wg-add.sh bin/aux/