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
!5
Add helm charts for cluster tasks and run tasks with a job
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add helm charts for cluster tasks and run tasks with a job
run-task-with-a-job
into
master
Overview
17
Commits
12
Pipelines
9
Changes
11
Merged
Dimitra Chatzichrysou
requested to merge
run-task-with-a-job
into
master
4 years ago
Overview
17
Commits
12
Pipelines
9
Changes
11
Expand
The task:
gets info about the drupal site
creates the job for running the script
monitors if the status of the job
waits for the job to succeed or fail
prints the final status of the job
prints the logs of the job
Logs of the taskrun pod:
Refers to:
https://gitlab.cern.ch/webservices/webframeworks-planning/-/issues/324
https://gitlab.cern.ch/webservices/webframeworks-planning/-/issues/312
Edited
3 years ago
by
Dimitra Chatzichrysou
0
0
Merge request reports
Compare
master
version 10
702ace39
3 years ago
version 9
39408258
3 years ago
version 8
b519f85f
3 years ago
version 7
44887940
3 years ago
version 6
ea5f700d
3 years ago
version 5
94e34141
3 years ago
version 4
9de3acdd
4 years ago
version 3
d4202fa4
4 years ago
version 2
fb1f0c9a
4 years ago
version 1
52d4528c
4 years ago
master (base)
and
latest version
latest version
6a082a06
12 commits,
3 years ago
version 10
702ace39
11 commits,
3 years ago
version 9
39408258
10 commits,
3 years ago
version 8
b519f85f
8 commits,
3 years ago
version 7
44887940
7 commits,
3 years ago
version 6
ea5f700d
7 commits,
3 years ago
version 5
94e34141
7 commits,
3 years ago
version 4
9de3acdd
6 commits,
4 years ago
version 3
d4202fa4
5 commits,
4 years ago
version 2
fb1f0c9a
4 commits,
4 years ago
version 1
52d4528c
3 commits,
4 years ago
11 files
+
136
−
86
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
11
Search (e.g. *.vue) (Ctrl+P)
task
s/clear-cache.yaml
→
chart/cluster-tasks/template
s/clear-cache.yaml
+
34
−
0
Options
@@ -10,9 +10,11 @@ spec:
-
name
:
namespace
type
:
string
description
:
The namespace of the drupal site
workspaces
:
-
name
:
job
steps
:
-
name
:
clear-cache
image
:
image-registry
.openshift
-
image
-registry.svc:5000/openshift/cli:latest
image
:
{{
.Values
.openshift
Cli.
image
}}
command
:
-
/bin/sh
-
'
-c'
@@ -20,6 +22,13 @@ spec:
-
|-
echo "--------------------------- Clear cache ---------------------------"
echo "Drupal site name: $(params.drupalSite)"
deploymentPod=$(oc get pods -n $(params.namespace) -l drupalSite=$(params.drupalSite) -l app=drupal -o custom-columns=POD:.metadata.name --no-headers)
echo "Deployment pod: $deploymentPod"
oc exec $deploymentPod -c php-fpm drush cr
export TASK=clear-cache
export DRUPALSITE=$(params.drupalSite)
export NAMESPACE=$(params.namespace)
export SERVING_POD_IMAGE=$(oc get -n $(params.namespace) drupalsite/$(params.drupalSite) -o=jsonpath='{.status.servingPodImage}')
envsubst < $(workspaces.job.path)/{{ .Values.jobTemplateFile }} | oc create -n $(params.namespace) -f -
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")
echo "Job status: $jobStatus"
echo "Job logs:"
oc logs job/$TASK-$DRUPALSITE -n $(params.namespace)
Loading