forked from inviqa/harness-spryker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathharness.yml
249 lines (244 loc) · 7.48 KB
/
harness.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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
---
harness('inviqa/spryker'):
description: A docker based development environment for Spryker
require:
services:
- proxy
- mail
confd:
- harness:/
---
attributes:
app:
web_owner: www-data
web_group: www-data
web_writable_dirs:
- '/app/data'
services:
- chrome
- postgres
- redis
- elasticsearch
- rabbitmq
- jenkins
- jenkins-runner
data_directory: /app/data
spryker:
salt: 2tkqCCRKy5rT4wMVz8KTCh8r3sJGkL5v
demoshop-url: https://github.com/spryker-shop/b2c-demo-shop.git
demoshop-version: "202212.0-p2"
mode: development
oauth_client_secret: ~
zed_request_token: ~
php:
composer:
major_version: 2
fpm:
ini:
max_execution_time: 600
version: "= version_compare(@('spryker.demoshop-version'), '202211.0', '<') ? '7.4' : '8.1'"
ini:
opcache.max_accelerated_files: 65407
opcache.memory_consumption: 512
database:
platform: postgres
host: postgres
user: spryker
pass: spryker
name: spryker
backend:
build:
when: 'true'
steps:
- task spryker:build:backend
install:
steps:
- task rabbitmq:vhosts
- "= @('services.jenkins.enabled') ? 'task http:wait \"$JENKINS_URL\"' : ''"
- task spryker:install
- task overlay:apply
init:
steps:
- "= @('services.jenkins.enabled') ? 'task http:wait \"$JENKINS_URL\"' : ''"
- task rabbitmq:vhosts
- task spryker:init
migrate:
steps:
- task spryker:migrate
frontend:
yves:
watch: npm run yves:watch
zed:
watch: npm run zed:watch
build:
distribution_packages_non_amd64:
- build-essential
- python
distribution_packages: "= host_architecture() == 'amd64' ? [] : @('frontend.build.distribution_packages_non_amd64')"
when: -f "package.json"
steps:
- task spryker:build:frontend
- ~
- ~
docker:
image:
console: "= 'my127/spryker:' ~ @('php.version') ~ '-fpm-' ~ @('php.distro_codename') ~ '-console'"
php-fpm: "= 'my127/spryker:' ~ @('php.version') ~ '-fpm-' ~ @('php.distro_codename')"
elasticsearch:
image: elasticsearch
tag: "= version_compare(@('spryker.demoshop-version'), '202009.0', '<=') ? '6.8.23' : '7.16.3'"
hostname_aliases: "= replace(filter_empty(flatten([
@('glue.external_hosts'),
@('yves.external_hosts'),
@('zed.external_hosts'),
@('zed_api.external_hosts')
])), '.' ~ @('domain'), '')"
lighthouse:
target:
url: = 'https://' ~ @('yves.external_hosts.DE')
redis:
protocol: redis
rabbitmq:
user: spryker
password: spryker
vhosts:
default: 'de-spryker'
DE: = 'de-spryker'
AT: = 'at-spryker'
US: = 'us-spryker'
jenkins:
host: jenkins
port: 8080
external_host: = 'jenkins-' ~ @('hostname')
yves:
external_hosts:
DE: = 'yves-de-' ~ @('hostname')
AT: = 'yves-at-' ~ @('hostname')
US: = 'yves-us-' ~ @('hostname')
zed:
external_hosts:
DE: = 'zed-de-' ~ @('hostname')
AT: = 'zed-at-' ~ @('hostname')
US: = 'zed-us-' ~ @('hostname')
root_dir: "= @('app.web_directory') ~ (version_compare(@('spryker.demoshop-version'), '202108.0', '>=') ? '/Backoffice' : '/Zed')"
zed_api:
external_hosts:
DE: = 'zed-api-de-' ~ @('hostname')
AT: = 'zed-api-at-' ~ @('hostname')
US: = 'zed-api-us-' ~ @('hostname')
root_dir: "= @('app.web_directory') ~ (version_compare(@('spryker.demoshop-version'), '202108.0', '>=') ? '/BackendGateway' : '/Zed')"
glue:
external_hosts:
DE: = 'glue-de-' ~ @('hostname')
AT: = 'glue-at-' ~ @('hostname')
US: = 'glue-us-' ~ @('hostname')
nginx:
global:
conf:
server_names_hash_bucket_size: 128
pipeline:
preview:
yves:
external_hosts:
DE: = 'yves-de-' ~ @('pipeline.preview.hostname')
AT: = 'yves-at-' ~ @('pipeline.preview.hostname')
US: = 'yves-us-' ~ @('pipeline.preview.hostname')
zed:
external_hosts:
DE: = 'zed-de-' ~ @('pipeline.preview.hostname')
AT: = 'zed-at-' ~ @('pipeline.preview.hostname')
US: = 'zed-us-' ~ @('pipeline.preview.hostname')
zed_api:
external_hosts:
DE: = 'zed-api-de-' ~ @('pipeline.preview.hostname')
AT: = 'zed-api-at-' ~ @('pipeline.preview.hostname')
US: = 'zed-api-us-' ~ @('pipeline.preview.hostname')
glue:
external_hosts:
DE: = 'glue-de-' ~ @('pipeline.preview.hostname')
AT: = 'glue-at-' ~ @('pipeline.preview.hostname')
US: = 'glue-us-' ~ @('pipeline.preview.hostname')
jenkins:
external_host: = 'jenkins-' ~ @('pipeline.preview.hostname')
smtp:
host: mailhog.kube-system.svc.cluster.local
resourcePrefix: ~
qa:
yves:
external_hosts:
DE: = 'yves-de-' ~ @('pipeline.qa.hostname')
AT: = 'yves-at-' ~ @('pipeline.qa.hostname')
US: = 'yves-us-' ~ @('pipeline.qa.hostname')
zed:
external_hosts:
DE: = 'zed-de-' ~ @('pipeline.qa.hostname')
AT: = 'zed-at-' ~ @('pipeline.qa.hostname')
US: = 'zed-us-' ~ @('pipeline.qa.hostname')
zed_api:
external_hosts:
DE: = 'zed-api-de-' ~ @('pipeline.qa.hostname')
AT: = 'zed-api-at-' ~ @('pipeline.qa.hostname')
US: = 'zed-api-us-' ~ @('pipeline.qa.hostname')
glue:
external_hosts:
DE: = 'glue-de-' ~ @('pipeline.qa.hostname')
AT: = 'glue-at-' ~ @('pipeline.qa.hostname')
US: = 'glue-us-' ~ @('pipeline.qa.hostname')
jenkins:
external_host: = 'jenkins-' ~ @('pipeline.qa.hostname')
smtp:
host: mailhog.kube-system.svc.cluster.local
helm:
timeout: 900
php-fpm:
pools:
www:
port: 9000
zed:
port: 9001
persistence:
enabled: false
spryker:
data:
claimName: spryker-data-pvc
mountPath: = @('app.data_directory')
accessMode: ReadWriteMany # the requirement if persistence is enabled
#storageClass: "..." most clusters need a custom storageclass
#hostPath: "..." alternatively for single node testing
size: 1Gi
redis:
enabled: true
jenkins:
enabled: true
accessMode: ReadWriteOnce
size: 2Gi
---
command('frontend yves watch'):
env:
COMPOSE_BIN: = @('docker.compose.bin')
COMPOSE_PROJECT_NAME: = @('namespace')
exec: |
#!bash(workspace:/)|@
# Use `bash -i` to load up /home/build/.bashrc, which sets up node version manager (nvm) paths
passthru $COMPOSE_BIN exec -u build --workdir '@('frontend.path')' console bash -i -c '@('frontend.yves.watch')'
command('frontend zed watch'):
env:
COMPOSE_BIN: = @('docker.compose.bin')
COMPOSE_PROJECT_NAME: = @('namespace')
exec: |
#!bash(workspace:/)|@
# Use `bash -i` to load up /home/build/.bashrc, which sets up node version manager (nvm) paths
passthru $COMPOSE_BIN exec -u build --workdir '@('frontend.path')' console bash -i -c '@('frontend.zed.watch')'
command('spryker-reset'):
env:
COMPOSE_PROJECT_NAME: = @('namespace')
exec: |
#!bash(workspace:/)|@
passthru "vendor/bin/console propel:database:drop"
passthru "vendor/bin/console propel:database:create"
passthru "app install"
---
import:
- harness/config/*.yml
- harness/attributes/*.yml
- harness/attributes/environment/={env('MY127WS_ENV','local')}.yml