-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathwercker.yml
87 lines (86 loc) · 2.99 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
box: plasticine/[email protected]
services:
- wercker/postgresql
- wercker/redis
build:
# The steps that will be executed on build
steps:
# Copy the dotenv config file into place
- script:
name: setup dotenv
code: cp -n .env.example .env
# Start the xvfb framebuffer
- script:
name: start xvfb
code: |
export DISPLAY=":99.0"
start-stop-daemon --start --quiet --pidfile /tmp/xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- $DISPLAY -screen 0 1024x768x24 -ac +extension GLX +render -noreset
sleep 3
cat /tmp/xvfb_99.pid
# A step that executes `bundle install` command
- bundle-install
# Configure some NPM and Bower specific things
- script:
name: prepare for npm install
code: |
npm config set ca ""
mkdir -p $WERCKER_CACHE_DIR/wercker/bower
cp -R $WERCKER_CACHE_DIR/wercker/bower/. ./
# A step that executes `npm install`
- npm-install:
options: --production
# A step that prepares the database.yml with settings from the database you defined in services
- rails-database-yml
- script:
name: db setup
code: RAILS_ENV=test bundle exec rake db:structure:load
- script:
name: consistency fail
code: RAILS_ENV=test bundle exec consistency_fail
- script:
name: rubocop
code: bundle exec rubocop
- script:
name: best practices
code: bundle exec rails_best_practices .
- script:
name: teaspoon
code: RAILS_ENV=test bundle exec teaspoon
- script:
name: rspec
code: bundle exec rspec --format=progress
- script:
name: cucumber
code: bundle exec cucumber
- script:
name: quality
code: bundle exec rake quality
after-steps:
# Make sure we persist the bower cache files into the bower cache dir
- script:
name: copy bower cache
code: |
cp -R .bower-* $WERCKER_CACHE_DIR/wercker/bower
- plasticine/[email protected]:
user: $LIBRATO_USER
token: $LIBRATO_TOKEN
namespace: aerobicio
- sherzberg/slack-notify:
subdomain: aerobic
token: $SLACK_TOKEN
channel: general
deploy:
steps:
- heroku-deploy:
key-name: HEROKU_KEY
install-toolbelt: true
run: |
rake db:migrate
rails runner -e production Rails.cache.clear
export GIT_SHA=$WERCKER_GIT_COMMIT
export GIT_BRANCH=$WERCKER_GIT_BRANCH
after-steps:
- sherzberg/slack-notify:
subdomain: aerobic
token: $SLACK_TOKEN
channel: general