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
592c097b
Commit
592c097b
authored
3 years ago
by
Vineet Reddy Rajula
Browse files
Options
Downloads
Patches
Plain Diff
Fix bugs in the restore task templates
parent
9f295dc4
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!10
Add restore site task & restructure job templates
Pipeline
#2829909
skipped
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
chart/cluster-tasks/templates/drupalsite-restore.yaml
+4
-4
4 additions, 4 deletions
chart/cluster-tasks/templates/drupalsite-restore.yaml
tekton-task-templates/restore_pv_job.yaml
+1
-1
1 addition, 1 deletion
tekton-task-templates/restore_pv_job.yaml
with
5 additions
and
5 deletions
chart/cluster-tasks/templates/drupalsite-restore.yaml
+
4
−
4
View file @
592c097b
...
@@ -32,17 +32,17 @@ spec:
...
@@ -32,17 +32,17 @@ spec:
export OPERATIONS_IMAGE={{ .Values.image }}
export OPERATIONS_IMAGE={{ .Values.image }}
export RESTORE_SERVICE_ACCOUNT={{ .Values.restoreServiceAccount }}
export RESTORE_SERVICE_ACCOUNT={{ .Values.restoreServiceAccount }}
envsubst < /tekton-task-templates/restore_pv_job.yaml | oc create -f -
envsubst < /tekton-task-templates/restore_pv_job.yaml | oc create -f -
oc wait --for=condition=complete job/$TASK-$(params.drupalSite) -n
openshift-cern-cephfs
oc wait --for=condition=complete job/$TASK-$(params.drupalSite) -n
$VELERO_NAMESPACE
jobStatus=$(oc get job/$TASK-$(params.drupalSite) -n
openshift-cern-cephfs
-o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo "Failed")
jobStatus=$(oc get job/$TASK-$(params.drupalSite) -n
$VELERO_NAMESPACE
-o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo "Failed")
echo "Files restore Job status: $jobStatus"
echo "Files restore Job status: $jobStatus"
echo "Files restore Job logs:"
echo "Files restore Job logs:"
oc logs job/$TASK-$DRUPALSITE -n
openshift-cern-cephfs
oc logs job/$TASK-$DRUPALSITE -n
$VELERO_NAMESPACE
echo "--------------------------- Drupalsite database restore ---------------------------"
echo "--------------------------- Drupalsite database restore ---------------------------"
export TASK=db-restore-$DATE
export TASK=db-restore-$DATE
export SERVING_POD_IMAGE=$(oc get -n $NAMESPACE drupalsite/$(params.drupalSite) -o=jsonpath='{.status.servingPodImage}')
export SERVING_POD_IMAGE=$(oc get -n $NAMESPACE drupalsite/$(params.drupalSite) -o=jsonpath='{.status.servingPodImage}')
export OPERATION="database-restore"
export OPERATION="database-restore"
export ARGS="-f database_backup"
export ARGS="-f database_backup
.sql
"
envsubst < /tekton-task-templates/drupal_operation_job.yaml | oc create -n $NAMESPACE -f -
envsubst < /tekton-task-templates/drupal_operation_job.yaml | oc create -n $NAMESPACE -f -
oc wait --for=condition=complete job/$TASK-$(params.drupalSite)
oc wait --for=condition=complete job/$TASK-$(params.drupalSite)
jobStatus=$(oc get job/$TASK-$(params.drupalSite) -o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo "Failed")
jobStatus=$(oc get job/$TASK-$(params.drupalSite) -o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo "Failed")
...
...
This diff is collapsed.
Click to expand it.
tekton-task-templates/restore_pv_job.yaml
+
1
−
1
View file @
592c097b
...
@@ -2,7 +2,7 @@ kind: Job
...
@@ -2,7 +2,7 @@ kind: Job
apiVersion
:
batch/v1
apiVersion
:
batch/v1
metadata
:
metadata
:
name
:
$TASK-$DRUPALSITE
name
:
$TASK-$DRUPALSITE
namespace
:
openshift-cern-cephfs
namespace
:
$VELERO_NAMESPACE
labels
:
labels
:
app
:
velero-restore
app
:
velero-restore
spec
:
spec
:
...
...
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