This repository has been archived by the owner on Mar 22, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
42 lines (38 loc) · 1.88 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
image: docker
stages:
- Static analysis
- Unit
EasyCodingStandard:
stage: Static analysis
extends:
- .base
script:
- docker exec "$(docker-compose ps -q example_app_server)" vendor/bin/ecs check
Unit:
stage: Unit
extends:
- .base
script:
- docker exec "$(docker-compose ps -q app_server)" ./psh.phar init
- docker exec "$(docker-compose ps -q app_server)" chown -R 1000:1000 config/jwt
- docker exec "$(docker-compose ps -q app_server)" bin/console app:install myAppName --activate --force
- docker exec "$(docker-compose ps -q example_app_server)" vendor/bin/phpunit -c dev-ops/gitlab/phpunit.xml.dist
.base:
services:
- docker:dind
before_script:
- apk add --no-cache docker-compose git
- git clone http://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.shopware.com/shopware/6/product/development.git build/development
- rm -rf build/development/platform
- git clone http://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.shopware.com/shopware/6/product/platform.git build/development/platform
- rm -rf build/development/docker-compose.yml
- cp -v ../shopwareappexample/dev-ops/gitlab/docker-compose.yml ../shopwareappexample/build/development/
- cp -v ../shopwareappexample/dev-ops/gitlab/.psh.yaml.override ../shopwareappexample/build/development/
- cd build/development
- docker-compose up -d
- docker exec "$(docker-compose ps -q example_app_server)" composer install
- rm -rf ../../shopwareappexample/.env
- mv ../../../shopwareappexample/dev-ops/gitlab/.env ../../../shopwareappexample/.env
- docker exec "$(docker-compose ps -q example_app_server)" bin/console doctrine:database:create
- docker exec "$(docker-compose ps -q example_app_server)" bin/console doctrine:migrations:migrate --no-interaction
- cp -r ../../../shopwareappexample/dev-ops/myAppName ../../../shopwareappexample/build/development/custom/apps