Skip to content

Commit

Permalink
Merge pull request #88 from vdice/set-x-for-helm-install-upgrade
Browse files Browse the repository at this point in the history
feat(run*.sh): set -x to display helm install/upgrade cmds
  • Loading branch information
Vaughn Dice authored Mar 13, 2017
2 parents 98a3546 + 5b1f67e commit 1daf3a8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
14 changes: 8 additions & 6 deletions scripts/run_e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,11 @@ chart_repo="$(get-chart-repo workflow "${CHART_REPO_TYPE}")"
echo "Adding workflow chart repo '${chart_repo}'"
helm repo add "${chart_repo}" https://charts.deis.com/"${chart_repo}"

# shellcheck disable=SC2046
helm install "${chart_repo}"/workflow --namespace=deis \
$(set-chart-version workflow) $(set-chart-values workflow) --set controller.registration_mode=enabled
install_cmd="helm install ${chart_repo}/workflow --namespace=deis \
$(set-chart-version workflow) --set controller.registration_mode=enabled $(set-chart-values workflow)"
# TODO: remove this "registration_mode" override when e2e tests expect "admin_only" as the default
# execute in subshell to print full command being run
(set -x; eval "${install_cmd}")

dump-logs && deis-healthcheck

Expand All @@ -17,9 +18,10 @@ chart_repo="$(get-chart-repo workflow-e2e "${CHART_REPO_TYPE}")"
echo "Adding workflow-e2e chart repo '${chart_repo}'"
helm repo add "${chart_repo}" https://charts.deis.com/"${chart_repo}"

# shellcheck disable=SC2046
helm install "${chart_repo}"/workflow-e2e --namespace=deis \
$(set-chart-version workflow-e2e) $(set-chart-values workflow-e2e)
install_cmd="helm install ${chart_repo}/workflow-e2e --namespace=deis \
$(set-chart-version workflow-e2e) $(set-chart-values workflow-e2e)"
# execute in subshell to print full command being run
(set -x; eval "${install_cmd}")

echo "Running kubectl describe pod workflow-e2e and piping the output to ${DEIS_DESCRIBE}"
kubectl describe pod workflow-e2e --namespace=deis >> "${DEIS_DESCRIBE}" 2> /dev/null
Expand Down
18 changes: 11 additions & 7 deletions scripts/run_upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ for chart_repo in ${chart_repos}; do
helm repo add "${chart_repo}" https://charts.deis.com/"${chart_repo}"
done

echo "Installing Workflow chart from the '${ORIGIN_WORKFLOW_REPO}' chart repo..."
# shellcheck disable=SC2046
helm install "${ORIGIN_WORKFLOW_REPO}"/workflow --namespace=deis \
$(set-chart-version workflow) $(set-chart-values workflow)
install_cmd="helm install ${ORIGIN_WORKFLOW_REPO}/workflow --namespace=deis \
$(set-chart-version workflow) $(set-chart-values workflow)"
# execute in subshell to print full command being run
(set -x; eval "${install_cmd}")

# get release name
release="$(helm ls --date --short | tail -n 1)"
helm ls "${release}"

Expand Down Expand Up @@ -42,10 +44,12 @@ if [ "${STORAGE_TYPE}" != "" ]; then
fi

# Upgrade release
echo "Upgrading release ${release} using the latest chart from the '${UPGRADE_WORKFLOW_REPO}' chart repo."
# shellcheck disable=SC2046
helm upgrade "${release}" "${UPGRADE_WORKFLOW_REPO}"/workflow $(set-chart-values workflow) --set controller.registration_mode=enabled
upgrade_cmd="helm upgrade ${release} ${UPGRADE_WORKFLOW_REPO}/workflow \
--set controller.registration_mode=enabled $(set-chart-values workflow)"
# TODO: remove this "registration_mode" override when e2e tests expect "admin_only" as the default
# execute in subshell to print full command being run
(set -x; eval "${upgrade_cmd}")

helm ls "${release}"

dump-logs && deis-healthcheck
Expand Down

0 comments on commit 1daf3a8

Please sign in to comment.