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

Merge branch 'fix-backup-cluster-task' into 'master'

Fix for checking status on backup ClusterTask

See merge request !19
parents fcf03133 58562e36
No related branches found
No related tags found
1 merge request!19Fix for checking status on backup ClusterTask
Pipeline #3878977 failed
...@@ -6,14 +6,15 @@ LABEL maintainer="Drupal Admins <drupal-admins@cern.ch>" ...@@ -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 # TODO: Download the binary for restic install, instead of using copart/restic repo
ARG restic_version=0.12.1 ARG restic_version=0.12.1
RUN yum install epel-release -y && \ RUN yum update -y && \
yum install epel-release -y && \
# install restic # install restic
yum install yum-plugin-copr -y && \ yum install yum-plugin-copr -y && \
yum copr enable copart/restic -y && \ yum copr enable copart/restic -y && \
yum install restic-${restic_version} -y && \ yum install restic-${restic_version} -y && \
# we need this to interact with manila OpenStack to get CephFS information # we need this to interact with manila OpenStack to get CephFS information
yum install centos-release-openstack-train -y && \ yum install centos-release-openstack-xena -y && \
yum install -y /usr/bin/openstack --disableplugin=protectbase && \ yum install -y /usr/bin/openstack python3-requests-kerberos && \
yum clean all yum clean all
COPY ./tekton-task-templates /tekton-task-templates COPY ./tekton-task-templates /tekton-task-templates
......
...@@ -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