diff --git a/chart/drupal-operations/templates/clear-cache.yaml b/chart/drupal-operations/templates/clear-cache.yaml index 32acc84ee5454a690a9c18036bd3c0a6ce5a5d4b..36d16fba24aa2baf8d1661d3515d765bbb77418c 100644 --- a/chart/drupal-operations/templates/clear-cache.yaml +++ b/chart/drupal-operations/templates/clear-cache.yaml @@ -32,7 +32,7 @@ spec: export NAMESPACE=$(params.namespace) export SERVING_POD_IMAGE=$(oc get -n "$NAMESPACE" "drupalsite/$DRUPALSITE" -o=jsonpath='{.status.servingPodImage}') envsubst < /tekton-task-templates/drupal_operation_job.yaml | oc create -n "$NAMESPACE" -f - - oc wait --for=condition=complete "job/$TASK-$DRUPALSITE" + oc wait --timeout=1h --for=condition=complete "job/$TASK-$DRUPALSITE" -n "$NAMESPACE" jobStatus=$(oc get "job/$TASK-$DRUPALSITE" -o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo "Failed") echo "Job status: $jobStatus" echo "Job logs:" diff --git a/chart/drupal-operations/templates/database-restore.yaml b/chart/drupal-operations/templates/database-restore.yaml index 3e9f4ed71e67572b85d7ab94af65a03053506af2..699426ae0b40bf0df68de17775f95d7ebf225d99 100644 --- a/chart/drupal-operations/templates/database-restore.yaml +++ b/chart/drupal-operations/templates/database-restore.yaml @@ -33,7 +33,7 @@ spec: export NAMESPACE=$(params.namespace) export SERVING_POD_IMAGE=$(oc get -n $NAMESPACE drupalsite/$DRUPALSITE -o=jsonpath='{.status.servingPodImage}') envsubst < /tekton-task-templates/drupal_operation_job.yaml | oc create -n $NAMESPACE -f - - oc wait --for=condition=complete job/$TASK-$DRUPALSITE + oc wait --timeout=1h --for=condition=complete job/$TASK-$DRUPALSITE -n "$NAMESPACE" jobStatus=$(oc get job/$TASK-$DRUPALSITE -o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo "Failed") echo "Job status: $jobStatus" echo "Job logs:" diff --git a/chart/drupal-operations/templates/drupalsite-restore.yaml b/chart/drupal-operations/templates/drupalsite-restore.yaml index 8fe740f64584a7f507cb508f76f1455d0b1c27ef..a185c0828902fcf4393cacabc660de0d0d03673f 100644 --- a/chart/drupal-operations/templates/drupalsite-restore.yaml +++ b/chart/drupal-operations/templates/drupalsite-restore.yaml @@ -37,7 +37,7 @@ spec: export OPERATIONS_IMAGE={{ .Values.image }} export RESTORE_SERVICE_ACCOUNT={{ .Values.restoreServiceAccount }} envsubst < /tekton-task-templates/restore_pv_job.yaml | oc create -f - - oc wait --for=condition=complete "job/$TASK-$DRUPALSITE" -n "$VELERO_NAMESPACE" + oc wait --timeout=1h --for=condition=complete "job/$TASK-$DRUPALSITE" -n "$VELERO_NAMESPACE" jobStatus=$(oc get job/$TASK-$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 logs:" @@ -51,7 +51,7 @@ spec: export OPERATION="database-restore" export ARGS="-f 'database_backup.sql'" envsubst < /tekton-task-templates/drupal_operation_job.yaml | oc create -n "$NAMESPACE" -f - - oc wait --for=condition=complete job/$TASK-$DRUPALSITE + oc wait --timeout=1h --for=condition=complete job/$TASK-$DRUPALSITE -n "$NAMESPACE" jobStatus=$(oc get job/$TASK-$DRUPALSITE -o=jsonpath='{.status.conditions[*].type}' | grep -i -E 'failed|complete' || echo "Failed") echo "Database restore Job status: $jobStatus" echo "Database restore Job logs:"