Skip to content

Commit

Permalink
Let Error Message Return for Helm Upgrade Install (#887)
Browse files Browse the repository at this point in the history
  • Loading branch information
xqi-nr authored Mar 29, 2023
1 parent c462716 commit 78d3d32
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions recipes/newrelic/infrastructure/kubernetes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -570,9 +570,13 @@ install:
echo "{\"Metadata\":{\"helmVersion\":\"$($SUDO helm version -c --short)\", \"helmCommandBeforeExecution\":\"$SUDO helm upgrade $CLEANED_ARGS\", \"K8sClientVersion\":\"$CLIENT_MAJOR_VERSION.$CLIENT_MINOR_VERSION\",\"K8sServerVersion\":\"$SERVER_MAJOR_VERSION.$SERVER_MINOR_VERSION\",\"DebugMessage\":\"$DEBUG_MESSAGE\"}}" | tee -a {{.NR_CLI_OUTPUT}} > /dev/null
if [[ $($SUDO helm upgrade $ARGS) ]]; then
else
echo “ERROR $? returned from: $SUDO helm upgrade $CLEANED_ARGS”
ERROR=$($SUDO helm upgrade $ARGS)
if [[ $? != 0 ]]; then
if [[ "${ERROR}" != "" ]]; then
echo "helm (version $HELM_VERSION) repo upgrade installation failed due to: $ERROR"
else
echo "helm (version $HELM_VERSION) repo upgrade installation failed."
fi
exit 131
fi
else
Expand Down

0 comments on commit 78d3d32

Please sign in to comment.