-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
73 lines (67 loc) · 2.17 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
box: wercker/rvm
services:
- wercker/mysql
# Build definition
# See the Rails section on the wercker devcenter:
# http://devcenter.wercker.com/articles/languages/ruby/settingup-rails4.html
# You will want to define your database as follows:
# services:
# - wercker/postgresql
# See more about services on our devcenter:
# http://devcenter.wercker.com/articles/services/
build:
steps:
# Uncomment this to force RVM to use a specific Ruby version
# - rvm-use:
# version: 2.1.5
# A step that executes `bundle install` command
- bundle-install
# A step that prepares the database.yml using the database in services
# - rails-database-yml
- rails-database-yml:
service: mysql
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
- script:
name: echo ruby information
code: |
echo "ruby version $(ruby --version) running"
echo "from location $(which ruby)"
echo -p "gem list: $(gem list)"
# Add more steps here:
# - script:
# name: rspec
# code: bundle exec rspec
- script:
name: Set up database
code: RAILS_ENV=test bundle exec rake db:schema:load
- script:
name: Run rspec
code: bundle exec rspec
after-steps:
- hipchat-notify:
token: $HIPCHAT_TOKEN
room-id: 1083994
from-name: wercker
deploy:
steps:
- script:
name: make .ssh directory
code: mkdir -p "$HOME/.ssh"
- create-file:
name: write ssh key
filename: $HOME/.ssh/id_rsa
overwrite: true
hide-from-log: true
content: $WERCKER_PEM_KEY
- script:
name: set permissions for ssh key
code: chmod 0400 $HOME/.ssh/id_rsa
- cap:
stage: production
tasks: deploy
after-steps:
- hipchat-notify:
token: $HIPCHAT_TOKEN
room-id: 1083994
from-name: wercker