This repository has been archived by the owner on Mar 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwercker.yml
60 lines (59 loc) · 1.81 KB
/
wercker.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
box: wercker/php
no-response-timeout: 15
build:
steps:
- script:
name: set timezone in PHP
code: echo 'date.timezone = "Europe/Amsterdam"' >> $HOME/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- script:
name: Update apt
code: sudo apt-get update
- script:
name: install GraphViz
code: sudo apt-get install graphviz php5-xsl
- script:
name: install dependencies
code: composer install --no-interaction
- script:
name: download ocular
code: wget https://scrutinizer-ci.com/ocular.phar
- script:
name: unit tests
code: ./bin/phpunit
- script:
name: Upload code coverage report to Scrutinizer
code: php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
deploy:
steps:
- script:
name: Update apt
code: sudo apt-get update
- script:
name: install python pip
code: sudo apt-get install python-pip
- script:
name: install ansible
code: sudo pip install ansible
- add-to-known_hosts:
hostname: staging.phpdoc.org
- add-to-known_hosts:
hostname: phpdoc.org
- mktemp:
envvar: PRIVATEKEY_PATH
- create-file:
name: Write private key to file
filename: $PRIVATEKEY_PATH
content: $DEPLOY_KEY_PRIVATE
overwrite: true
hide-from-log: true
- mktemp:
envvar: INVENTORY_PATH
- create-file:
name: Generate ansible inventory
filename: $INVENTORY_PATH
content: $HOSTS
overwrite: true
hide-from-log: true
- script:
name: Run ansible
code: ansible-playbook --tags=release -i $INVENTORY_PATH -u mvriel --private-key=$PRIVATEKEY_PATH ansible/playbook.yml --extra-vars "release_type=minor"