Commit 4f1f7aca authored by Manuel Hoffmann's avatar Manuel Hoffmann Committed by David McKay

Add -e flag to shell arguments to avoid removal of backup files when the upload fails.

parent 1be78024
......@@ -71,6 +71,7 @@ spec:
- /bin/sh
args:
- '-c'
- '-e'
- |
if [ -n "$KEY_FILE" ]; then
gcloud auth activate-service-account --key-file $KEY_FILE
......@@ -101,6 +102,7 @@ spec:
- /bin/sh
args:
- '-c'
- '-e'
- |
az storage container create --name "$DST_CONTAINER"
az storage blob upload-batch --destination "$DST_CONTAINER" --destination-path "$DST_PATH" --source "$SRC_URL"
......@@ -130,6 +132,7 @@ spec:
- /bin/sh
args:
- '-c'
- '-e'
- |
aws {{- if .Values.backup.s3.endpointUrl }} --endpoint-url={{ .Values.backup.s3.endpointUrl }} {{- end }} s3 cp --recursive "$SRC_URL" "$DST_URL"
rm -rf /backup/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment