-
Notifications
You must be signed in to change notification settings - Fork 0
/
harness.yml
171 lines (171 loc) · 8.14 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
---
harness('inviqa/akeneo'):
description: A docker based development environment for akeneo 4.x
require:
services:
- proxy
- mail
confd:
- harness:/
attributes:
standard:
- akeneo.edition
- akeneo.enterprise.distribution.project_name
- ssh.key.public
secret_file:
- ssh.key.private
---
attributes:
app:
web_owner: www-data
web_group: www-data
web_writable_dirs:
- = @('app.uploads_directory')
- = @('app.file_storage_directory')
- /app/var/cache
- /app/var/logs
services:
- chrome
- elasticsearch
- mysql
- job-queue-consumer
- cron
file_storage_directory: /app/var/file_storage
uploads_directory: /app/var/uploads
web_directory: /app/public
src_resources_directory: /app/src/Resources
vendor_directory: /app/vendor
akeneo:
major_version: 6
secret: AMjnA6QnWfkZ9s8vB2XXLALXuxZm7fmC
edition: ~
# Akeneo 6+ only
messenger_consumers: ui_job import_export_job data_maintenance_job
enterprise:
distribution:
project_name: ~
php:
version: "= (version_compare(@('akeneo.major_version'), '6', '>=')) ? '8.0' : ((version_compare(@('akeneo.major_version'), '5', '>=')) ? 7.4 : 7.3)"
ini:
apc.enable_cli: On
composer:
major_version: "= (version_compare(@('akeneo.major_version'), '5', '>=')) ? 2 : 1"
node:
version: "= (version_compare(@('akeneo.major_version'), '6', '>=')) ? '18' : null"
database:
user: akeneo
pass: akeneo
name: akeneo
platform_version: '8.0'
import:
steps:
- passthru echo 'Importing database file'
- run "set -e -o pipefail; pv --force \"$1\" | zcat | mysql -h \"$DB_HOST\" -u \"$DB_ADMIN_USER\" -p\"$DB_ADMIN_PASS\" \"$DB_NAME\""
- passthru bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
- passthru echo 'Reindexing Elasticsearch'
- task http:wait "${ELASTICSEARCH_URL:-${ELASTICSEARCH_SCHEME:-http}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}}" ${ELASTICSEARCH_USERNAME:+--user "${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}"}
- run bin/console akeneo:elasticsearch:reset-indexes -n
- run bin/console pim:product:index --all
- run bin/console pim:product-model:index --all
- passthru echo 'Clearing cache'
- run bin/console c:c
- passthru echo 'Done'
backend:
build:
steps:
- |
if grep -q akeneo/pim-enterprise-dev composer.json; then
run "ssh-keyscan github.com >> ~/.ssh/known_hosts"
run "ssh-keyscan -p 443 distribution.akeneo.com >> ~/.ssh/known_hosts"
run "chmod 0600 /home/build/.ssh/id_*"
fi
- task composer:install
- "= version_compare(@('akeneo.major_version'), '5', '>=') ? '! [ -e config/bundles.harness.php ] || run mv config/bundles.harness.php config/bundles.php' : 'rm -f config/bundles.harness.php'"
install:
steps:
- task http:wait "${ELASTICSEARCH_URL:-${ELASTICSEARCH_SCHEME:-http}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}}" ${ELASTICSEARCH_USERNAME:+--user "${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}"}
- = 'passthru bin/console pim:installer:db --catalog vendor/akeneo/pim-' ~ @('akeneo.edition') ~ '-dev/src/Akeneo/Platform/Bundle/InstallerBundle/Resources/fixtures/minimal'
- task overlay:apply
- task assets:dump
init:
steps:
- passthru bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
- task http:wait "${ELASTICSEARCH_URL:-${ELASTICSEARCH_SCHEME:-http}://${ELASTICSEARCH_HOST}:${ELASTICSEARCH_PORT}}" ${ELASTICSEARCH_USERNAME:+--user "${ELASTICSEARCH_USERNAME}:${ELASTICSEARCH_PASSWORD}"}
- run bin/console akeneo:elasticsearch:reset-indexes --no-interaction
- run bin/console pim:product:index --all
- run bin/console pim:product-model:index --all
migrate:
steps:
- passthru bin/console doctrine:migrations:migrate --no-interaction --allow-no-migration
cron:
jobs:
- 15 12,20 * * * /cron-run-with-env.sh /app/bin/console akeneo:rule:run --env=prod
- 30 16,23 * * * /cron-run-with-env.sh /app/bin/console pim:versioning:refresh --env=prod
- 20 0 1 * * /cron-run-with-env.sh /app/bin/console akeneo:batch:purge-job-execution --env=prod
- 20 0 * * * /cron-run-with-env.sh /app/bin/console pimee:project:notify-before-due-date --env=prod
- 1 0 * * * /cron-run-with-env.sh /app/bin/console akeneo:connectivity-audit:update-data --env=prod
- 0 2 * * * /cron-run-with-env.sh /app/bin/console pimee:project:recalculate --env=prod
- 0 23 * * * /cron-run-with-env.sh /app/bin/console akeneo:reference-entity:refresh-records --all --env=prod
- 4 22 * * * /cron-run-with-env.sh /app/bin/console pimee:sso:rotate-log 10 --env=prod
- 0 23 * * * /cron-run-with-env.sh /app/bin/console pim:volume:aggregate --env=prod
- "= (version_compare(@('akeneo.major_version'), '5', '>=')) ? '15 0 * * * /cron-run-with-env.sh /app/bin/console pim:data-quality-insights:schedule-periodic-tasks --env=prod' : '15 0 * * * /cron-run-with-env.sh /app/bin/console pimee:data-quality-insights:schedule-periodic-tasks --env=prod'"
- "= (version_compare(@('akeneo.major_version'), '5', '>=')) ? '*/30 * * * * /cron-run-with-env.sh /app/bin/console pim:data-quality-insights:evaluations --env=prod' : '*/30 * * * * /cron-run-with-env.sh /app/bin/console pimee:data-quality-insights:evaluate-products --env=prod'"
- 0 4 * * * /cron-run-with-env.sh /app/bin/console pim:versioning:purge --more-than-days 90 --no-interaction --force --env=prod
- 0 2 * * * /cron-run-with-env.sh /app/bin/console pim:completeness:calculate --env=prod
frontend:
path: /app
build:
when: -f "package.json"
steps:
- "= version_compare(@('akeneo.major_version'), '6', '>=') ? 'export NODE_OPTIONS=--openssl-legacy-provider' : ''"
- run yarn install --frozen-lockfile
- run bin/console cache:warmup
- run bin/console pim:installer:assets --symlink --clean
- run yarn run less
- "= (version_compare(@('akeneo.major_version'), '6', '>=')) ? 'NO_DOCKER=1 run make front-packages' : ((version_compare(@('akeneo.major_version'), '5', '>=')) ? 'NO_DOCKER=1 run make dsm' : '')"
- |
if [ "$APP_BUILD" == "static" ]; then
run yarn run webpack
if [ "$(jq ".scripts.\"update-extensions\" != null" < package.json)" != "false" ]; then
run yarn update-extensions
fi
run rm -rf node_modules/
run yarn cache clean
else
run yarn run webpack-dev
if [ "$(jq ".scripts.\"update-extensions\" != null" < package.json)" != "false" ]; then
run yarn update-extensions
fi
fi
docker:
image:
console: "= 'my127/akeneo:' ~ @('php.version') ~ '-fpm-' ~ @('php.distro_codename') ~ '-console'"
php-fpm: "= 'my127/akeneo:' ~ @('php.version') ~ '-fpm-' ~ @('php.distro_codename')"
nginx:
# used to limit what is copied into an Nginx static-built image
# vendor directory needed for vendor/*/*/*/public/ resources (images etc.)
copy_directories:
- = @('app.web_directory')
- = @('app.vendor_directory')
persistence:
enabled: false
akeneo:
file_storage:
claimName: akeneo-file-storage-pvc
mountPath: = @('app.file_storage_directory')
accessMode: ReadWriteMany # the requirement if persistence is enabled
#storageClass: "..." most clusters need a custom storageclass
#hostPath: "..." alternatively for single node testing
size: 1Gi
uploads:
claimName: akeneo-uploads-pvc
mountPath: = @('app.uploads_directory')
accessMode: ReadWriteMany # the requirement if persistence is enabled
#storageClass: "..." most clusters need a custom storageclass
#hostPath: "..." alternatively for single node testing
size: 1Gi
---
import:
- harness/config/*.yml
- harness/attributes/*.yml
- harness/attributes/environment/={env('MY127WS_ENV','local')}.yml