-
Notifications
You must be signed in to change notification settings - Fork 0
/
harness.yml
146 lines (146 loc) · 4.22 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
---
harness('inviqa/magento1'):
description: A docker based development environment for magento1
require:
services:
- proxy
- mail
confd:
- harness:/
attributes:
standard:
- magento.edition
secret:
- composer.auth.github
- magento.crypt.key
---
attributes:
app:
web_owner: www-data
web_group: www-data
web_writable_dirs:
- '/app/public/media'
- '/app/public/sitemaps'
- '/app/public/staging'
- '/app/public/var'
- '/app/public/var/log'
- '/app/public/var/report'
services:
- chrome
- mysql
- redis
- redis-session
web_directory: /app/public
media_directory: = @('app.web_directory') ~ '/media'
database:
host: mysql
user: magento
pass: magento
name: magento
jenkins:
tests:
# Magento 1 connects to backend services during phstan analyse
isolated: false
php:
entrypoint:
steps:
- |
if [ -f /home/build/application/overlay/public/app/etc/local.xml.harness.template ]; then
envsubst < /home/build/application/overlay/public/app/etc/local.xml.harness.template > /home/build/application/overlay/public/app/etc/local.xml
fi
- |
if [ -f /app/public/app/etc/local.xml.harness.template ]; then
envsubst < /app/public/app/etc/local.xml.harness.template > /app/public/app/etc/local.xml
fi
ini:
opcache.max_accelerated_files: 32531
opcache.memory_consumption: 320
install_extensions:
- "= @('services.blackfire.enabled') ? 'blackfire' : ''"
- "= @('services.tideways.enabled') ? 'tideways' : ''"
- memcached
- redis
version: 7.2
magento:
edition: enterprise
version: 1.14.4.5
environment: ''
run:
code: []
type: []
admin:
path: admin
config:
session:
save: redis
mysql:
tag: '5.7'
backend:
build:
steps:
- task composer:install
- task n98:install
install:
steps:
- run rm -f /app/public/app/etc/local.xml
- |
passthru php public/install.php -- \
--license_agreement_accepted yes \
--locale en_GB \
--timezone 'Europe/London' \
--default_currency GBP \
--db_model mysql4 \
--db_host "${DB_HOST}" \
--db_name "${DB_NAME}" \
--db_user "${DB_USER}" \
--db_pass "${DB_PASS}" \
--url "https://${APP_HOST}/" \
--skip_url_validation yes \
--use_rewrites yes \
--use_secure yes \
--secure_base_url "https://${APP_HOST}/" \
--use_secure_admin yes \
--admin_firstname First \
--admin_lastname Last \
--admin_email '[email protected]' \
--admin_username admin \
--admin_password "${ADMIN_DEFAULT_PASSWORD}" \
--encryption_key "${MAGENTO_CRYPT_KEY}" \
--session_save db \
--admin_frontname admin
- run rm -f /app/public/app/etc/local.xml
- task overlay:apply
- task assets:dump
init:
steps:
- run n98-magerun.phar config:set 'web/unsecure/base_url' "https://${APP_HOST}/"
- run n98-magerun.phar config:set 'web/secure/base_url' "https://${APP_HOST}/"
- task migrate
migrate:
steps:
- run n98-magerun.phar sys:setup:incremental -n
- run n98-magerun.phar index:reindex:all
- run n98-magerun.phar cache:clean
persistence:
enabled: false
magento:
media:
claimName: magento-media-pvc
mountPath: = @('app.media_directory')
accessMode: ReadWriteMany # the requirement if persistence is enabled
#storageClass: "..." most clusters need a custom storageclass
#hostPath: "..." alternatively for single node testing
size: 1Gi
---
command('redis-flush'):
env:
COMPOSE_BIN: = @('docker.compose.bin')
COMPOSE_PROJECT_NAME: = @('namespace')
exec: |
#!bash(harness:/)|@
$COMPOSE_BIN exec redis redis-cli flushall
---
import:
- harness/config/*.yml
- harness/attributes/*.yml
- harness/attributes/environment/={env('MY127WS_ENV','local')}.yml