Skip to content
Snippets Groups Projects

Fix for checking status on backup ClusterTask

Merged Dimitra Chatzichrysou requested to merge fix-backup-cluster-task into master
Files
2
@@ -38,6 +38,6 @@ spec:
export PROJECT_HASH=$(printf '%s' "$NAMESPACE" | md5sum | awk '{print $1}')
export VELERO_NAMESPACE={{ .Values.veleroNamespace }}
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")
echo "DrupalSite backup status: $backupStatus"
Loading