-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
44 lines (40 loc) · 953 Bytes
/
.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
stages:
- setup
- style
variables:
DOCKER_DRIVER: overlay2
BASE_SW_VERSION: '5.6.10'
COMPOSER_COMMAND: "composer install --prefer-dist --no-ansi --no-interaction --no-progress --optimize-autoloader"
COMPOSER_HOME: /var/www/html/var/cache/composer
DOCKWARE_CI: '1'
before_script:
- ${COMPOSER_COMMAND}
- cp -r ${CI_PROJECT_DIR} /var/www/html/custom/plugins/${CI_PROJECT_NAME}
composer:
stage: setup
image: "dockware/dev:${BASE_SW_VERSION}"
cache:
key:
files:
- composer.lock
paths:
- vendor/
script:
- "true"
codestyle:
stage: style
image: "dockware/dev:${BASE_SW_VERSION}"
needs:
- composer
except:
variables: [ $DISABLE_PHP_CS == "1" ]
script:
- cd /var/www/html/custom/plugins/${CI_PROJECT_NAME} && vendor/bin/php-cs-fixer fix -v --dry-run
cache:
key:
files:
- composer.lock
policy: pull
paths:
- .php-cs-fixer.cache
- vendor/