-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
44 lines (38 loc) · 1.18 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
image: chaplean/php:7.1-no-xdebug
services:
- name: chaplean/mysql:mariadb10.1
alias: mysql
variables:
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: app_user
MYSQL_PASSWORD: app_password
MYSQL_DATABASE: test_database
cache:
paths:
- bin/
- vendor/
before_script:
- mkdir -p /root/.ssh
- echo -e "Host *\n\tForwardAgent yes\n\n" > /root/.ssh/config
- echo "$CHAPLEAN_DEPLOY_KEY" >> /root/.ssh/id_rsa && chmod 0600 /root/.ssh/id_rsa
- echo "$CHAPLEAN_KNOWN_HOSTS" >> /root/.ssh/known_hosts && chmod 0600 /root/.ssh/known_hosts
- eval `ssh-agent -s`
- ssh-add
test:
stage: test
script:
- composer install --prefer-dist --no-interaction
- chmod -R +x ./bin/
- phpdbg -qrr ./bin/phpunit --configuration phpunit.xml.dist --colors=never --coverage-html coverage/ --coverage-text
artifacts:
paths:
- coverage/
expire_in: 1 day
deploy:
stage: deploy
script:
- ssh [email protected] /home/www/chaplean.coop/satis/bin/satis build /home/www/chaplean.coop/satis/satis.json /home/www/chaplean.coop/satis/web
only:
- master
- release
- dev