Skip to content
Snippets Groups Projects
Commit 64d77b39 authored by Dimitra Chatzichrysou's avatar Dimitra Chatzichrysou
Browse files

Fix for checking status on backup ClusterTask

parent fcf03133
No related branches found
No related tags found
1 merge request!19Fix for checking status on backup ClusterTask
Pipeline #3865450 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.
Please register or to comment