-
Notifications
You must be signed in to change notification settings - Fork 0
/
wercker.yml
76 lines (73 loc) · 2.87 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
# This references the default Ruby container from
# the Docker Hub.
# https://registry.hub.docker.com/_/ruby/
# If you want to use a specific version you would use a tag:
# ruby:2.2.2
box: ruby:2.2.4
# You can also use services such as databases. Read more on our dev center:
# http://devcenter.wercker.com/docs/services/index.html
services:
- id: postgres
env:
POSTGRES_PASSWORD: itssosecreticantbelieveit!!1!1
# http://devcenter.wercker.com/docs/services/postgresql.html
# - mongodb
# http://devcenter.wercker.com/docs/services/mongodb.html
# This is the build pipeline. Pipelines are the core of wercker
# Read more about pipelines on our dev center
# http://devcenter.wercker.com/docs/pipelines/index.html
build:
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# http://devcenter.wercker.com/docs/steps/index.html
steps:
- script:
name: Install PhantomJS
code: |
VERSION=2.1.1 &&
# NOTE: Does not check for legacy version
if ! which phantomjs; then
INSTALL_DIR=/usr/local/share &&
# cdn_url=http://cnpmjs.org/downloads &&
cdn_url=https://github.com/Medium/phantomjs/releases/download/v2.1.1 &&
PHANTOM_JS=phantomjs-$VERSION-linux-x86_64 &&
PHANTOM_JS_ZIP=$PHANTOM_JS.tar.bz2 &&
cd $INSTALL_DIR &&
curl --retry 2 \
--retry-max-time 60 \
--remote-name \
--location \
-- ${cdn_url}/$PHANTOM_JS_ZIP &&
tar xjf $PHANTOM_JS_ZIP &&
ln -s $INSTALL_DIR/$PHANTOM_JS/bin/phantomjs /usr/local/bin/phantomjs
fi
- inz/vendor-binaries
- script:
name: Source .profile.d scripts
code: for script in .profile.d/*; do source $script; done
- script:
name: Bundle config
code: |
# Workaround for Nokogiri build failure,
# see: https://github.com/sparklemotion/nokogiri/issues/1370
bundle config build.nokogiri --use-system-libraries
- bundle-install
- rails-database-yml
- script:
name: Set up db
code: bundle exec rake db:schema:load RAILS_ENV=test
- script:
name: test
code: bundle exec rake test
trigger_docs:
steps:
- script:
name: Trigger docs collector
code: |
curl -H "Authorization: Bearer $WERCKER_TOKEN" \
-H "Content-Type: application/json" \
-X POST \
-d "{\"pipelineId\":\"5885d76e50c9930100a025f4\"}" \
--retry 2 \
--retry-max-time 15 \
-- "https://app.wercker.com/api/v3/runs"