-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathwercker.yml
73 lines (61 loc) · 2.1 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: ruby:2.3.1
no-response-timeout: 20
# Build definition
build:
# The steps that will be executed on build
# See the Ruby section on the wercker devcenter:
# http://devcenter.wercker.com/articles/languages/ruby.html
steps:
# 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)"
- script:
name: create .ssh directory
code: mkdir -p $HOME/.ssh
- create-file:
name: put private key
filename: $HOME/.ssh/id_rsa.vagrant
overwrite: true
hide-from-log: true
content: $DIGITALOCEAN_PRIVATE_KEY
- create-file:
name: put public key
filename: $HOME/.ssh/id_rsa.vagrant.pub
overwrite: true
hide-from-log: true
content: $DIGITALOCEAN_PUBLIC_KEY
- script:
name: chmod 600 id_rsa
code: chmod 600 $HOME/.ssh/id_rsa.vagrant
- script:
name: download vagrant
code: wget https://releases.hashicorp.com/vagrant/1.9.5/vagrant_1.9.5_x86_64.deb
- script:
name: install vagrant
code: sudo dpkg -i vagrant_1.9.5_x86_64.deb
- script:
name: install libxml, libxslt and rsync
code: |
DEBIAN_FRONTEND=noninteractiv sudo apt -y update && sudo apt install -y libxml2-dev libxslt1-dev rsync
- script:
name: install vagrant-digitalocean
code: NOKOGIRI_USE_SYSTEM_LIBRARIES=1 vagrant plugin install vagrant-digitalocean
- script:
name: start vm
code: vagrant up --provider=digital_ocean
# Add more steps here:
- script:
name: mruby build
code: vagrant ssh -c 'cd /vagrant/ && git submodule update --init && cd /usr/local/src/mruby && sudo rake test' -- -ttt
after-steps:
- script:
name: shutdown vm
code: vagrant destroy -f
- script:
name: shutdown old vms
code: ruby ci/cleanup.rb