Skip to content
Snippets Groups Projects
Commit 9f295dc4 authored by Vineet Reddy Rajula's avatar Vineet Reddy Rajula
Browse files

Add sleep in backup clusterTask

parent 104406ba
No related branches found
No related tags found
1 merge request!10Add restore site task & restructure job templates
Pipeline #2829790 skipped
......@@ -27,7 +27,6 @@ spec:
export NAME_HASH=$(printf '%s' "$NAMESPACE/$DRUPALSITE" | md5sum | awk '{print $1}')
export VELERO_NAMESPACE={{ .Values.veleroNamespace }}
envsubst < /tekton-task-templates/backup_resource.yaml | oc create -f -
timeout 60s bash -c -- 'while [ $(oc get backup/$TASK-$(params.drupalSite) -n $VELERO_NAMESPACE -o jsonpath='{.status.phase}') = "Completed" ]; do printf "Backup completed successfully"; exit; done'
sleep 60s
backupStatus=$(oc get backup/$TASK-$(params.drupalSite) -n $VELERO_NAMESPACE -o=jsonpath='{.status.phase}' | grep -i -E 'failed|completed|partiallyfailed' || echo "Failed")
sleep
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