-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
67 lines (57 loc) · 1.54 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
variables:
#MYSQL_ALLOW_EMPTY_PASSWORD: "1"
MYSQL_ROOT_PASSWORD: "fake"
MYSQL_DATABASE: "app"
MYSQL_USER: "user"
MYSQL_PASSWORD: "password"
#services:
# - mariadb:10.1
image: dock.melt.im/docker/php:7.1-alpine-dev
# Job template to run tests
.phpunit: &phpunit
image: dock.melt.im/docker/php:${CI_BUILD_NAME}-alpine-dev
cache:
key: "composer-${CI_BUILD_NAME}"
paths:
- vendor/
variables:
COMPOSER_ALLOW_SUPERUSER: '1'
before_script:
- php --version
- composer --version
script:
- composer config -g gitlab-domains git.melting-media.com
- composer install --no-interaction --no-progress
- composer outdated
- vendor/bin/phpunit --version
- vendor/bin/phpunit --coverage-text --colors=never
"7.1":
<<: *phpunit
"7.0":
<<: *phpunit
"5.6":
<<: *phpunit
# Template for jobs needed to be run only for "releases"
.only:
only: &only
- master
# - tags
# - triggers
# - master@composer/modx-shell
# Reload Satis instance
composer:
stage: deploy
only: *only
script:
- curl --silent -X POST -F token=${TRIGGER_TOKEN} -F "ref=master" -F "variables[NS]=modx/shell" ${TRIGGER}
## Mirror to Github repository
mirror:
#image: alpine:latest
stage: deploy
only: *only
services: []
before_script:
- apk --no-cache add git
- git --version
script:
- git push https://[email protected]/meltingmedia/MODX-Shell.git master --tags