forked from GaetanRole/symfony-lts-docker-starter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
112 lines (97 loc) · 1.97 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
image:
name: docker/compose:1.26.0
entrypoint: ["/bin/sh", "-c"]
services:
- docker:dind
stages:
- build
- tests
- quality-assurance
variables:
APP_PATH: ./app/symfony
DOCKER_DRIVER: overlay2
DOCKER_HOST: tcp://docker:2375
COMPOSE_FILE: "docker-compose.yml:docker-compose.gitlab-ci.yml"
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- $APP_PATH/public/build
- $APP_PATH/node_modules
- $APP_PATH/vendor
.gitlab-container-registry: &internal-image
before_script:
- apk add --no-cache make
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
- docker-compose pull http web-stack node || true
tags:
- docker
## Stage build
build-docker:
<<: *internal-image
stage: build
script:
- make build
- make start
- make symfony:.env.local
- make symfony:vendor
- make symfony:node_modules
- make symfony:assets
- docker-compose push
## Stage tests
unit-functional-tests:
<<: *internal-image
stage: tests
script:
- make start
- make symfony:phpunit
behat:
<<: *internal-image
stage: tests
script:
- make start
- make symfony:db-init
- make symfony:behat
## Stage quality-assurance
security:
<<: *internal-image
stage: quality-assurance
script:
- make start
- make symfony:security
lint:
<<: *internal-image
stage: quality-assurance
script:
- make start
- make symfony:lint
php-cs-fixer:
<<: *internal-image
stage: quality-assurance
script:
- make start
- make symfony:qa_php-cs-fixer
phpcs:
<<: *internal-image
stage: quality-assurance
script:
- make start
- make symfony:phpcbf
- make symfony:phpcs
phploc:
<<: *internal-image
stage: quality-assurance
script:
- make start
- make symfony:phploc
phpcpd:
<<: *internal-image
stage: quality-assurance
script:
- make start
- make symfony:phpcpd
phpmd:
<<: *internal-image
stage: quality-assurance
script:
- make start
- make symfony:phpmd