Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-operations
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
drupal
paas
drupal-operations
Commits
7df52a22
Commit
7df52a22
authored
2 years ago
by
Francisco Borges Aurindo Barros
Browse files
Options
Downloads
Patches
Plain Diff
Updated DrupalSite backup task, as it had misleading message and arbitrary timeout
parent
d4009015
Branches
improve-backup-task
No related tags found
1 merge request
!24
Updated DrupalSite backup task, as it had misleading message and arbitrary timeout
Pipeline
#5354342
passed
2 years ago
Stage: build
Changes
1
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
chart/drupal-operations/templates/drupalsite-backup.yaml
+7
-3
7 additions, 3 deletions
chart/drupal-operations/templates/drupalsite-backup.yaml
with
7 additions
and
3 deletions
chart/drupal-operations/templates/drupalsite-backup.yaml
+
7
−
3
View file @
7df52a22
...
...
@@ -38,6 +38,10 @@ 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'
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"
BACKUP_STATE=$(oc get "backup/$RESOURCE_NAME" -n "$VELERO_NAMESPACE" -o jsonpath='{.status.phase}');
# While the backup is pending OR inProgress, we wait
while [[ ${BACKUP_STATE,,} == "inprogress" || ${BACKUP_STATE,,} == "pending" ]] ; do printf "Backup in state $STATE"; sleep 3s; BACKUP_STATE=$(oc get "backup/$RESOURCE_NAME" -n "$VELERO_NAMESPACE" -o jsonpath='{.status.phase}') ; done
echo "DrupalSite backup status: $BACKUP_STATE"
if [[ ${BACKUP_STATE,,} != "completed" ]]; then
exit 1
fi
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment