Skip to content
Snippets Groups Projects
Commit 58562e36 authored by Dimitra Chatzichrysou's avatar Dimitra Chatzichrysou Committed by Konstantinos Samaras-Tsakiris
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
......@@ -6,14 +6,15 @@ LABEL maintainer="Drupal Admins <drupal-admins@cern.ch>"
# TODO: Download the binary for restic install, instead of using copart/restic repo
ARG restic_version=0.12.1
RUN yum install epel-release -y && \
RUN yum update -y && \
yum install epel-release -y && \
# install restic
yum install yum-plugin-copr -y && \
yum copr enable copart/restic -y && \
yum install restic-${restic_version} -y && \
# we need this to interact with manila OpenStack to get CephFS information
yum install centos-release-openstack-train -y && \
yum install -y /usr/bin/openstack --disableplugin=protectbase && \
yum install centos-release-openstack-xena -y && \
yum install -y /usr/bin/openstack python3-requests-kerberos && \
yum clean all
COPY ./tekton-task-templates /tekton-task-templates
......
......@@ -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"
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