Skip to content
Snippets Groups Projects
Commit 32356cc3 authored by Bertrand Goareguer's avatar Bertrand Goareguer Committed by Pierre Smeyers
Browse files

fix(deploy): deploy packaged chart instead of chart file (required for chart with dependencies)

parent 0121ffa7
No related branches found
No related tags found
No related merge requests found
......@@ -455,16 +455,17 @@ stages:
helm_opts="$helm_opts --namespace $namespace"
fi
chart=${HELM_DEPLOY_CHART:-$HELM_CHART_DIR}
if [ -z "${chart}" ]; then
package=$(ls -1 ./helm_packages/*.tgz 2>/dev/null || echo "")
package=${package:-$HELM_DEPLOY_CHART}
if [ -z "${package}" ]; then
log_error "No Chart to deploy! Please use \\e[32m\$HELM_DEPLOY_CHART\\e[0m to deploy a chart from a repository"
log_error "Or check the provided variables to package your own chart!"
exit 1
fi
log_info "--- using \\e[32mchart\\e[0m: \\e[33;1m${chart}\\e[0m"
log_info "--- using \\e[32mpackage\\e[0m: \\e[33;1m${package}\\e[0m"
# shellcheck disable=SC2086
helm $helm_opts $HELM_DEPLOY_ARGS $environment_name $chart
helm $helm_opts $HELM_DEPLOY_ARGS $environment_name $package
# maybe execute post deploy script
postscript="$HELM_SCRIPTS_DIR/helm-post-deploy.sh"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment