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
Merge requests
!24
Updated DrupalSite backup task, as it had misleading message and arbitrary timeout
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
Updated DrupalSite backup task, as it had misleading message and arbitrary timeout
improve-backup-task
into
master
Overview
0
Commits
1
Pipelines
2
Changes
1
Open
Francisco Borges Aurindo Barros
requested to merge
improve-backup-task
into
master
2 years ago
Overview
0
Commits
1
Pipelines
2
Changes
1
Expand
0
0
Merge request reports
Compare
master
master (HEAD)
and
latest version
latest version
7df52a22
1 commit,
2 years ago
1 file
+
7
−
3
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
chart/drupal-operations/templates/drupalsite-backup.yaml
+
7
−
3
Options
@@ -39,6 +39,10 @@ spec:
export VELERO_NAMESPACE={{ .Values.veleroNamespace }}
export VELERO_BACKUP_STORAGE_LOCATION={{ .Values.veleroBackupStorageLocation }}
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
Loading