-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
64 lines (64 loc) · 2.04 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
61
62
63
64
box: clone1018/php55@0.0.1
services:
- wercker/postgresql
- wercker/nodejs
build:
# The steps that will be executed on build
steps:
- script:
name: enable composer cache
code: |
export COMPOSER_CACHE_DIR="$WERCKER_CACHE_DIR/composer"
mkdir -p $COMPOSER_CACHE_DIR
- script:
name: install dependencies
code: |-
composer config github-oauth.github.com $GH_OAUTH
composer install --no-interaction --prefer-dist
- npm-install
- plasticine/bower-install@0.0.4
- hgen/gulp:
tasks: default
- script:
name: migrate database
code: php artisan migrate --env=wercker
- script:
name: run unit tests
code: phpunit
after-steps:
- wouter/irc-notify@0.0.9:
server: irc.freenode.net
port: 6667
nickname: wercbot
channel: patchnotes
deploy:
steps:
- add-to-known_hosts:
hostname: patchnotes.org
- mktemp:
envvar: PRIVATEKEY_PATH
- create-file:
name: write key
filename: $PRIVATEKEY_PATH
content: $DO_PRIVATE
overwrite: true
- script:
name: stop application
code: |
ssh -i $PRIVATEKEY_PATH -l patchnotes patchnotes.org "cd /srv/www/patchnotes.org/website/ && php artisan down"
- script:
name: transfer application
code: |
rsync -a -e "ssh -i $PRIVATEKEY_PATH" /pipeline/build/* patchnotes@patchnotes.org:/srv/www/patchnotes.org/website/
- script:
name: migrate database
code: |
ssh -i $PRIVATEKEY_PATH -l patchnotes patchnotes.org "cd /srv/www/patchnotes.org/website/ && php artisan migrate --force"
- script:
name: reset permissions
code: |
ssh -i $PRIVATEKEY_PATH -l patchnotes patchnotes.org "chmod -Rf 775 /srv/www/patchnotes.org/website/storage/ || :"
- script:
name: start application
code: |
ssh -i $PRIVATEKEY_PATH -l patchnotes patchnotes.org "cd /srv/www/patchnotes.org/website/ && php artisan up"