-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcontinuous-pipe.yml
175 lines (167 loc) · 4.88 KB
/
continuous-pipe.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
# Set default/global variables.
variables:
- name: CP_ENVIRONMENT
expression: code_reference.branch
tasks:
images:
build:
environment:
- name: GITHUB_TOKEN
value: ${GITHUB_TOKEN}
services:
web:
image: quay.io/inviqa_images/drupal8-lightning
db_deployment:
deploy:
cluster: ${CLUSTER}
environment:
name: '"drupal8-lightning-" ~ code_reference.branch'
services:
database:
specification:
volumes:
- type: persistent
name: database-volume
capacity: 5Gi
storage_class: default
volume_mounts:
- name: database-volume
mount_path: /var/lib/mysql
command:
- /usr/local/bin/docker-entrypoint.sh
- mysqld
- --ignore-db-dir=lost+found
- --max_allowed_packet=128M
ports:
- 3306
resources:
requests:
cpu: 50m
memory: 250Mi
limits:
cpu: 500m
memory: 2Gi
environment_variables:
- name: MYSQL_ROOT_PASSWORD
value: ${DATABASE_ROOT_PASSWORD}
- name: MYSQL_USER
value: ${DRUPAL_DATABASE_USERNAME}
- name: MYSQL_PASSWORD
value: ${DRUPAL_DATABASE_PASSWORD}
- name: MYSQL_DATABASE
value: ${DRUPAL_DATABASE_NAME}
deployment_strategy:
readiness_probe:
type: tcp
port: 3306
web_deployment:
deploy:
cluster: ${CLUSTER}
environment:
name: '"drupal8-lightning-" ~ code_reference.branch'
services:
web:
specification:
volumes:
- type: persistent
name: web-public-files-volume
capacity: 5Gi
storage_class: default
volume_mounts:
- name: web-public-files-volume
mount_path: /app/docroot/sites/default/files
environment_variables:
- name: GITHUB_TOKEN
value: ${GITHUB_TOKEN}
- name: DRUPAL_DATABASE_NAME
value: ${DRUPAL_DATABASE_NAME}
- name: DRUPAL_DATABASE_USERNAME
value: ${DRUPAL_DATABASE_USERNAME}
- name: DRUPAL_DATABASE_PASSWORD
value: ${DRUPAL_DATABASE_PASSWORD}
- name: DRUPAL_DATABASE_PREFIX
value: ${DRUPAL_DATABASE_PREFIX}
- name: DRUPAL_DATABASE_HOST
value: ${DRUPAL_DATABASE_HOST}
- name: DRUPAL_DATABASE_PORT
value: ${DRUPAL_DATABASE_PORT}
- name: CP_ENVIRONMENT
value: ${CP_ENVIRONMENT}
ports:
- 80
resources:
requests:
cpu: 50m
memory: 500Mi
limits:
cpu: 1
memory: 2G
varnish:
endpoints:
-
name: http
specification:
ports:
- 80
resources:
limits:
cpu: 50m
memory: 500Mi
deployment_strategy:
readiness_probe:
type: tcp
port: 80
solr_deployment:
deploy:
cluster: ${CLUSTER}
environment:
name: '"drupal8-lightning-" ~ code_reference.branch'
services:
solr:
specification:
volumes:
- type: persistent
name: solr-volume
capacity: 5Gi
storage_class: default
volume_mounts:
- name: solr-volume
mount_path: /usr/local/share/solr/drupal/data/
ports:
- 8983
resources:
requests:
cpu: 50m
memory: 250Mi
limits:
cpu: 500m
memory: 500Mi
deployment_strategy:
readiness_probe:
type: tcp
port: 8983
pipelines:
- name: Remote Dev
condition: 'code_reference.branch matches "/^cpdev/" or code_reference.branch == "feature/enhance-cp-config"'
tasks:
- images
- db_deployment
- solr_deployment
- web_deployment
variables:
- name: CP_ENVIRONMENT
value: development
- name: Review Branches
condition: '"cp enabled" in pull_request.labels'
tasks: &review_tasks
- images
- db_deployment
- solr_deployment
- web_deployment
variables: &review_variables
- name: CP_ENVIRONMENT
value: staging
- name: UAT
condition: 'code_reference.branch in ["staging", "release"]'
tasks: *review_tasks
variables: *review_variables