forked from shopware/shopware
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
588 lines (562 loc) · 23.3 KB
/
.gitlab-ci.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
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
variables:
DOCKER_DRIVER: overlay2
DOCKER_HOST: "tcp://docker:2375"
DOCKER_TLS_CERTDIR: "/certs"
MYSQL_ROOT_PASSWORD: app
WEB_DOCUMENT_ROOT: $CI_PROJECT_DIR/development/public
GIT_STRATEGY: clone
LOG_STDOUT: $CI_PROJECT_DIR/stdout.log
MYSQL_CMD: mysqld
stages:
- unit
- E2E
- Build
- Generate docs
- Security
- Deploy
#include:
# - local: .gitlab/ci/split.yml
default:
image: shopware/development:7.4-composer-2
before_script:
- apt-install jq
- export CI_DEV_BRANCH=$(echo $CI_COMMIT_REF_NAME | cut -d'+' -f2-)
- if [[ -d "development/" ]]; then zip -rq cache.zip development/; rm -rf development; fi
- zip -rq platform.zip .
- git clone http://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.shopware.com/shopware/6/product/development.git
- unzip -q platform.zip -d development/platform/
- cd development
- git -C platform checkout trunk
- git -C platform checkout $CI_COMMIT_SHA
- >
if [ "$(git ls-remote origin $CI_DEV_BRANCH | wc -l)" == 1 ]; then
echo "Development Branch: $CI_DEV_BRANCH (explicit)";
git checkout $CI_DEV_BRANCH;
elif [ "$(git ls-remote origin $CI_COMMIT_REF_NAME | wc -l)" == 1 ]; then
echo "Development Branch: $CI_COMMIT_REF_NAME (implicit by same branch name)";
git checkout $CI_COMMIT_REF_NAME;
else
export CI_TARGET_BRANCH_NAME=$(curl -LsS -H "PRIVATE-TOKEN: $CI_GITLAB_API_TOKEN" "https://gitlab.shopware.com/api/v4/projects/$CI_PROJECT_ID/merge_requests?source_branch=$CI_COMMIT_REF_NAME" | jq --raw-output ".[0].target_branch");
if [ "$(git ls-remote origin $CI_TARGET_BRANCH_NAME | wc -l)" == 1 ]; then
echo "Development Branch: $CI_TARGET_BRANCH_NAME (implicit by merge request target branch)";
git checkout $CI_TARGET_BRANCH_NAME;
else
echo "Development Branch: trunk (fallback)";
fi
fi
- cp -v dev-ops/gitlab/.psh.yaml.override .
- /entrypoint supervisord > /dev/null 2>&1 &
interruptible: true
# stage: unit
.phpunit_base:
stage: unit
variables:
TEST_SUITES: "administration storefront checkout content framework profiling migration system elasticsearch docs"
timeout: 1h 00m
script:
- echo matrix config
- echo EACH_MR $EACH_MR
- echo Mysql $MYSQL_IMAGE
- echo Mysql cmd $MYSQL_CMD
- echo Dev template $DEV_IMAGE
- echo Features $FEATURE_ALL
- ./psh.phar init
- if [[ ! -h vendor/shopware/platform ]]; then echo 'vendor/shopware/platform should be a symlink'; exit 1; fi
- mkdir -p build/artifacts/
# run all code in test env
- ./psh.phar cache --APP_ENV=test
- chown -R application:application .
- curl http://docker.vm:8000/admin
- failed="0"
- echo -e
'<?xml version="1.0" encoding="UTF-8"?>
<testsuites>
' > build/artifacts/phpunit.junit.xml
- >
for TEST_SUITE in $TEST_SUITES; do
log_unit_file=build/artifacts/$TEST_SUITE.junit.xml
set -x
php vendor/bin/phpunit --configuration vendor/shopware/platform/phpunit.xml.dist --log-junit "$log_unit_file" --colors=never --testsuite "$TEST_SUITE" || exit_code=$?
if [ $exit_code -ne "0" ]; then failed="1"; fi;
set +x
tail -n +3 "$log_unit_file" | head -n -1 >> build/artifacts/phpunit.junit.xml
done
- echo -e "</testsuites>" >> "build/artifacts/phpunit.junit.xml"
- if [ $failed -ne "0" ]; then exit 1; fi;
coverage: '/^\s*Lines:\s*(\d+(?:\.\d+)?%)/'
artifacts:
when: always
paths:
- development/build/artifacts/
- development/var/log/*
- $CI_PROJECT_DIR/stdout.log
reports:
junit: development/build/artifacts/phpunit.junit.xml
PHP Unit:
extends: .phpunit_base
image: $DEV_IMAGE
stage: unit
services:
- name: $MYSQL_IMAGE
alias: mysql
entrypoint: [ "sh", "-c", "docker-entrypoint.sh $MYSQL_CMD" ]
- name: elastic/elasticsearch:7.1.1
alias: elasticsearch
command: [ "bin/elasticsearch", "-Expack.security.enabled=false", "-Ediscovery.type=single-node" ]
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*unit::skip.*/'
when: never
- if: '$CI_PIPELINE_SOURCE == "schedule"'
- if: '$CI_PIPELINE_SOURCE == "pipeline"'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- "Migration*.php"
- "**/Migration*.php"
- "src/Core/Framework/Resources/config/packages/shopware.yaml"
- if: '($CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH =~ /^(trunk|6\..+)$/) && $EACH_MR == "true"'
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*unit::all.*/'
- if: '$CI_PIPELINE_SOURCE == "merge_request_event"'
when: manual
allow_failure: true
parallel:
matrix:
- EACH_MR: 'true'
MYSQL_IMAGE: mariadb:10.4
DEV_IMAGE: shopware/development:7.4-composer-2
FEATURE_ALL: ["false", "minor", "major"]
- MYSQL_IMAGE:
- mysql:5.7
- mariadb:10.3
DEV_IMAGE: shopware/development:7.4-composer-2
FEATURE_ALL: ["false", "minor", "major"]
- MYSQL_IMAGE:
- mysql:8.0.19
DEV_IMAGE: shopware/development:7.4-composer-2
FEATURE_ALL: ["false", "minor", "major"]
MYSQL_CMD: 'mysqld --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci --default-authentication-plugin=mysql_native_password --sql-require-primary-key=ON'
Javascript analysis:
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
- schedules
- pipelines
stage: unit
timeout: 1h 00m
before_script: []
script:
- cd src/Administration/Resources/app/administration
- npm clean-install
- PROJECT_ROOT=$(pwd) node_modules/.bin/eslint --ext .js,.vue --format junit src test > eslint.junit.xml
artifacts:
reports:
junit: src/Administration/Resources/app/administration/eslint.junit.xml
PHP analysis:
image: shopware/development:7.4-composer-2
cache:
key: "${CI_JOB_NAME}_2"
paths:
# disabled due to possible cache issue NEXT-12933
#- development/var/cache/cs_fixer/
- development/var/cache/phpstan/
- development/var/cache/psalm/
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
stage: unit
services:
- name: mysql:5.7
alias: mysql
retry:
max: 2
when: runner_system_failure
timeout: 1h 00m
script:
- ./psh.phar init
- if [[ ! -h vendor/shopware/platform ]]; then echo 'vendor/shopware/platform should be a symlink'; exit 1; fi
- cd ..
- if [[ -f "cache.zip" ]]; then unzip -q cache.zip; fi
- cd development
- php dev-ops/analyze/generate-composer.php
- php dev-ops/analyze/vendor/bin/ecs check platform/src --config platform/easy-coding-standard.php
- php dev-ops/analyze/phpstan-config-generator.php
- php dev-ops/analyze/vendor/bin/phpstan analyze --autoload-file=dev-ops/analyze/vendor/autoload.php --configuration platform/phpstan.neon --error-format gitlab | tee phpstan-report.json
- php dev-ops/analyze/vendor/bin/psalm --config=platform/psalm.xml --threads=$(nproc) --diff --diff-methods --show-info=false
- php bin/console changelog:check
artifacts:
reports:
codequality: development/phpstan-report.json
Check generated Docs:
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
stage: unit
services:
- name: mysql:5.7
alias: mysql
retry:
max: 2
when: runner_system_failure
timeout: 1h 00m
script:
- ./psh.phar init
- if [[ ! -h vendor/shopware/platform ]]; then echo 'vendor/shopware/platform should be a symlink'; exit 1; fi
- cd ..
- cd development
- echo "Checking the generated doc files"
- bin/console docs:dump-erd
- bin/console docs:dump-core-characteristics
- cd platform
- >
if ! git diff --exit-code --ignore-submodules HEAD --; then
echo "Docs have changed, please run 'bin/console docs:dump-core-characteristics' and 'bin/console docs:dump-erd'";
git diff --exit-code;
exit 1;
else
echo "Everything ok"
exit 0;
fi
# jest
Administration (Jest):
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
- pipelines
stage: unit
timeout: 1h 00m
services:
- name: mariadb:10.3
alias: mysql
script:
- ./psh.phar init
- ./psh.phar administration:install-dependencies
- ./psh.phar administration:unit
coverage: '/^\s?All files[^|]*\|[^|]*\s+([\d\.]+)/'
artifacts:
reports:
junit: development/build/artifacts/administration.junit.xml
Storefront (Jest):
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
- pipelines
stage: unit
timeout: 1h 00m
variables:
PROJECT_ROOT: $CI_PROJECT_DIR/development
services:
- name: mariadb:10.3
alias: mysql
script:
- ./psh.phar init
- ./psh.phar storefront:install-dependencies
- npm --prefix vendor/shopware/platform/src/Storefront/Resources/app/storefront/ run unit
coverage: '/^\s?All files[^|]*\|[^|]*\s+([\d\.]+)/'
artifacts:
reports:
junit: development/build/artifacts/storefront.junit.xml
# snippets
Validate snippets:
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
changes:
- src/**/snippet/**/*.json
stage: unit
timeout: 1h 00m
services:
- name: mariadb:10.3
alias: mysql
script:
- ./psh.phar init
- php bin/console snippets:validate
# Stage: E2E
E2E:
timeout: 2h 00m
stage: E2E
needs: [Javascript analysis]
services:
- name: docker:18.09.7-dind
alias: docker
- name: mariadb:10.3
alias: mysql
script:
- mkdir -p $HOME/.docker
- echo "$DOCKER_AUTH_CONFIG" > $HOME/.docker/config.json
- docker login
- rm $HOME/.docker/config.json
- echo matrix config
- echo cypress_grep $cypress_grep
- echo SECTION $SECTION
- echo TEST_DIRECTORY $TEST_DIRECTORY
- mkdir -p config/packages/
- cp platform/src/Core/Framework/Resources/config/packages/e2e/e2e.yaml config/packages/shopware.yaml
- echo FEATURE_ALL $FEATURE_ALL
- echo BROWSER $BROWSER
- echo cypress_usePercy $cypress_usePercy
- ./psh.phar init --APP_ENV="prod"
- ./psh.phar administration:init --APP_ENV="prod"
- ./psh.phar storefront:init --APP_ENV="prod" --DB_NAME="shopware_e2e"
- ./psh.phar e2e:dump-db --APP_ENV="prod"
- E2E_BASE_PATH=vendor/shopware/platform/src/${SECTION}/Resources/app/$(echo ${SECTION} | tr '[:upper:]' '[:lower:]')/test/e2e
- npm install -g [email protected]
- npm i @shopware-ag/[email protected] --prefix $E2E_BASE_PATH
- forever start ${E2E_BASE_PATH}/node_modules/@shopware-ag/e2e-testsuite-platform/routes/cypress.js
- chown -R 1000:1000 .
- CYPRESS_CMD="cypress run"
- if [[ $cypress_usePercy = "true" ]]; then export CYPRESS_CMD="npx percy exec -- cypress run"; npm install --save-dev @percy/cypress; fi
- FULL_CYPRESS_CMD="npm install --production --prefix /e2e && export PERCY_TOKEN=$PERCY_TOKEN && $CYPRESS_CMD --browser chrome --project /e2e --config baseUrl=http://docker.vm:8000 $CYPRESS_PARAMS --spec $TEST_DIRECTORY"
- echo $FULL_CYPRESS_CMD
- docker run --shm-size=2g --name cypress --add-host="docker.vm:$(hostname -I)" -e cypress_grep -e cypress_usePercy -e CYPRESS_baseUrl=http://docker.vm:8000 -v $(pwd)/${E2E_BASE_PATH}:/e2e -v $(pwd):/app -w /e2e --entrypoint "sh" cypress/included:5.6.0 -c "$FULL_CYPRESS_CMD"
after_script:
- npx mochawesome-merge development/build/artifacts/e2e/mochawesome/single-reports/mochawesome*.json > development/build/artifacts/e2e/mochawesome/report-final.json
- npx mochawesome-report-generator development/build/artifacts/e2e/mochawesome/report-final.json --cdn true --reportDir development/build/artifacts/e2e/mochawesome
- docker rm -f cypress
artifacts:
when: always
paths:
- development/build/artifacts/e2e/
- development/var/log/*
- $CI_PROJECT_DIR/stdout.log
reports:
junit: development/build/artifacts/e2e/*.xml
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*E2E::skip.*/ || ($cypress_grep == null && $CI_MERGE_REQUEST_LABELS =~ /.*E2E::only_base.*/)'
when: never
# run full tests if trigger by scheduled or another pipeline (production)
- if: '$cypress_grep == null && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "pipeline")'
# skip @base jobs if trigger by scheduled or another pipeline (production)
- if: '$cypress_grep && ($CI_PIPELINE_SOURCE == "schedule" || $CI_PIPELINE_SOURCE == "pipeline")'
when: never
# run full tests if there are changes to migrations
- if: '$cypress_grep == null && $CI_PIPELINE_SOURCE == "merge_request_event"'
changes:
- "Migration*.php"
- "**/Migration*.php"
- "src/Core/Framework/Resources/config/packages/shopware.yaml"
# skip @base jobs if there are changes to migrations, because the full set runs
- if: '$cypress_grep && $CI_PIPELINE_SOURCE == "merge_request_event" && $CI_MERGE_REQUEST_LABELS !~ /.*E2E::only_base.*/'
changes:
- "Migration*.php"
- "**/Migration*.php"
- "src/Core/Framework/Resources/config/packages/shopware.yaml"
when: never
- if: '$cypress_grep == null && $CI_MERGE_REQUEST_LABELS =~ /.*E2E::all.*/'
- if: '$cypress_grep && $CI_MERGE_REQUEST_LABELS =~ /.*E2E::all.*/'
when: never
- if: '$cypress_grep && ($CI_PIPELINE_SOURCE == "merge_request_event" || $CI_COMMIT_BRANCH =~ /^(master|6\..+)$/)'
- if: '$cypress_grep == null && $CI_PIPELINE_SOURCE == "merge_request_event"'
when: manual
allow_failure: true
parallel:
matrix:
- cypress_grep: '@base'
SECTION: 'Storefront'
TEST_DIRECTORY: "cypress/integration/**/*"
FEATURE_ALL: ["false", "minor", "major"]
BROWSER: 'chrome'
CYPRESS_PARAMS: "--config numTestsKeptInMemory=0"
cypress_usePercy: 'false'
- cypress_grep: '@base'
SECTION: 'Administration'
TEST_DIRECTORY:
- "cypress/integration/content/**/* cypress/integration/catalogue/**/*"
- "cypress/integration/customer/**/* cypress/integration/media-marketing/**/*"
- "cypress/integration/general/**/* cypress/integration/order/**/*"
- "cypress/integration/rule-product-stream/**/* cypress/integration/settings/**/*"
FEATURE_ALL: "false" # ["false", "true"]
BROWSER: 'chrome'
CYPRESS_PARAMS: "--config numTestsKeptInMemory=0"
cypress_usePercy: 'false'
- SECTION: 'Storefront'
TEST_DIRECTORY: "cypress/integration/**/**/*"
BROWSER: ['chrome']
FEATURE_ALL: ["false", "minor", "major"]
cypress_usePercy: 'false'
- SECTION: 'Storefront'
TEST_DIRECTORY: "cypress/integration/**/**/*"
BROWSER: 'firefox'
FEATURE_ALL: 'false'
cypress_usePercy: 'false'
- SECTION: 'Administration'
TEST_DIRECTORY:
- "cypress/integration/content/**/* cypress/integration/catalogue/**/* cypress/integration/customer/**/* cypress/integration/media-marketing/**/*"
- "cypress/integration/general/**/* cypress/integration/order/**/* cypress/integration/rule-product-stream/**/* cypress/integration/settings/**/*"
BROWSER: 'chrome'
FEATURE_ALL: ["false", "minor", "major"]
cypress_usePercy: 'false'
- SECTION: 'Administration'
TEST_DIRECTORY:
- "cypress/integration/content/**/* cypress/integration/catalogue/**/* cypress/integration/customer/**/* cypress/integration/media-marketing/**/*"
- "cypress/integration/general/**/* cypress/integration/order/**/* cypress/integration/rule-product-stream/**/* cypress/integration/settings/**/*"
BROWSER: 'firefox'
FEATURE_ALL: 'false'
cypress_usePercy: 'false'
- SECTION: 'Administration'
TEST_DIRECTORY: "cypress/integration/visual/**/*"
BROWSER: 'chrome'
FEATURE_ALL: "false"
cypress_usePercy: $CYPRESS_PERCY_USAGE
# Stage: build
Component Library:
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
changes:
- src/Administration/**/*
- src/Storefront/**/*
stage: Build
image: node:10.8
before_script: []
dependencies: []
needs: [Administration (Jest), Storefront (Jest)]
variables:
PROJECT_ROOT: $CI_PROJECT_DIR
environment:
name: Component Library
url: https://component-library.shopware.com
script:
- npm install --prefix src/Administration/Resources/app/administration
- npm install --prefix src/Administration/Resources/app/administration/build/nuxt-component-library/
- npm run --prefix src/Administration/Resources/app/administration/build/nuxt-component-library/ generate
- "[[ -d build/artifacts/component-library/ ]] && (ls -1qA build/artifacts/component-library/ | grep -q .)"
artifacts:
paths:
- build/artifacts/component-library/
# Stage: Generate docs
Generating docs:
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
changes:
- src/Docs/**/*
stage: Generate docs
dependencies: []
services:
- name: docker:18.09.7-dind
alias: docker
script:
- mkdir -p $HOME/.docker
- echo "$DOCKER_AUTH_CONFIG" > $HOME/.docker/config.json
- docker login
- rm $HOME/.docker/config.json
- docker build -t shopware-plattform-plantuml dev-ops/docs/docker/plantuml/.
- sh ./dev-ops/docs/scripts/render_puml.sh platform/src/Docs/Resources/current
- ./psh.phar init-composer
- php dev-ops/docs/scripts/convertMarkdownToDocs.php convert -i platform/src/Docs/Resources/current/ -o build/docs -u /shopware-platform-dev -s
# Stage: security
RIPS security:
stage: Security
image: php:7.4-alpine
before_script: []
allow_failure: true
only:
- trunk
- schedules
script:
- apk add --no-cache libzip-dev && docker-php-ext-configure zip --with-libzip=/usr/include && docker-php-ext-install zip
- wget https://github.com/rips/rips-cli/releases/download/3.2.0/rips-cli.phar -O /usr/bin/rips-cli
- chmod 755 /usr/bin/rips-cli
- rips-cli rips:scan:start -p . -t critical:0 -a ${RIPS_APP_ID} --progress
interruptible: false
Symfony security check:
stage: unit
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
- schedules
- pipelines
image: shopware/development:7.4-composer-2
variables:
PLATFORM_PACKAGES: ". src/Core src/Administration src/Docs src/Elasticsearch src/Recovery src/Storefront"
script:
- composer install --no-interaction --no-scripts
- curl --location --output local-php-security-checker https://github.com/fabpot/local-php-security-checker/releases/download/v1.0.0/local-php-security-checker_1.0.0_linux_amd64
- echo 'e5b12488ca78bc07c149e9352278bf10667b88a8461caac10154f9a6f5476369 local-php-security-checker' > local-php-security-checker.sha256
- sha256sum --check local-php-security-checker.sha256
- chmod +x local-php-security-checker
- ./local-php-security-checker
- composer install --no-interaction --no-scripts -d vendor/shopware/platform/src/Recovery
- ./local-php-security-checker --path=vendor/shopware/platform/src/Recovery
- >
for PLATFORM_PACKAGE in $PLATFORM_PACKAGES; do
echo "Testing vendor/shopware/platform/$PLATFORM_PACKAGE"
composer install --no-interaction --no-scripts -d vendor/shopware/platform/$PLATFORM_PACKAGE
./local-php-security-checker --path=vendor/shopware/platform/$PLATFORM_PACKAGE
done
NPM security check:
stage: Security
only:
refs:
- merge_requests
- trunk
- /^6\..*$/
- schedules
- pipelines
image: shopware/development:7.4-composer-2
before_script: []
allow_failure: true
script:
- cd src/Administration/Resources/app/administration
- npm i
- npm install --save-dev audit-ci
- node node_modules/.bin/audit-ci --moderate --allowlist http-proxy elliptic
- cd ../../../../../src/Storefront/Resources/app/storefront
- npm i
- npm install --save-dev audit-ci
- node node_modules/.bin/audit-ci --moderate --allowlist dot-prop http-proxy acorn jquery elliptic
# Stage: deploy
.Scrutinizer:
stage: Deploy
image: php:7.4-alpine
allow_failure: true
before_script: []
only:
- trunk
- /^6\..*$/
dependencies:
- PHPUnit (MySQL)
script:
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload
--repository="g/shopware/platform"
--revision="$CI_COMMIT_SHA"
--format=php-clover
development/build/artifacts/phpunit.clover.xml
interruptible: false
Upload Component Library:
stage: Deploy
image: python:latest
before_script: []
only:
refs:
- trunk
- /^6\..*$/
changes:
- src/Administration/**/*
- src/Storefront/**/*
dependencies:
- Component Library
script:
- pip install awscli
- cd build/artifacts/component-library
- aws s3 sync --delete --acl public-read . s3://shopware-ui-component-library-docs/
- aws cloudfront create-invalidation --distribution-id E18U17118IAC82 --paths "/*"
interruptible: false