Skip to content
Snippets Groups Projects
Commit 1ce8059a authored by Konstantinos Samaras-Tsakiris's avatar Konstantinos Samaras-Tsakiris
Browse files

Apply 1 suggestion(s) to 1 file(s)

parent b2c0a9da
No related branches found
No related tags found
1 merge request!19Fix for checking status on backup ClusterTask
Pipeline #3876064 failed
...@@ -38,6 +38,6 @@ spec: ...@@ -38,6 +38,6 @@ spec:
export PROJECT_HASH=$(printf '%s' "$NAMESPACE" | md5sum | awk '{print $1}') export PROJECT_HASH=$(printf '%s' "$NAMESPACE" | md5sum | awk '{print $1}')
export VELERO_NAMESPACE={{ .Values.veleroNamespace }} export VELERO_NAMESPACE={{ .Values.veleroNamespace }}
envsubst < /tekton-task-templates/backup_resource.yaml | oc create -f - envsubst < /tekton-task-templates/backup_resource.yaml | oc create -f -
timeout 120s sh -c -- 'while [[ $(oc get backup/$RESOURCE_NAME -n $VELERO_NAMESPACE -o jsonpath='{.status.phase}') != "Completed" ]]; do printf "Backup in progress\n"; sleep 2s; done' timeout 120s sh -c -- 'while [[ $(oc get "backup/$RESOURCE_NAME" -n "$VELERO_NAMESPACE" -o jsonpath='{.status.phase}') != "Completed" ]]; do printf "Backup in progress\n"; sleep 2s; done'
backupStatus=$(oc get backup/$RESOURCE_NAME -n $VELERO_NAMESPACE -o=jsonpath='{.status.phase}' | grep -i -E 'failed|completed|partiallyfailed' || echo "Failed") backupStatus=$(oc get backup/$RESOURCE_NAME -n $VELERO_NAMESPACE -o=jsonpath='{.status.phase}' | grep -i -E 'failed|completed|partiallyfailed' || echo "Failed")
echo "DrupalSite backup status: $backupStatus" echo "DrupalSite backup status: $backupStatus"
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