This repository has been archived by the owner on Mar 8, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwercker.yml
58 lines (58 loc) · 1.52 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
box: ruby:2.3.7
build:
steps:
- script:
name: install nodejs
code: |
curl -sL https://deb.nodesource.com/setup_8.x | bash
apt-get install -y nodejs
- bundle-install:
jobs: 4
binstubs: true
- create-file:
name: write oauth.yml
filename: $WERCKER_SOURCE_DIR/config/oauth.yml
overwrite: true
hide-from-log: true
content: $CONFIG_OAUTH_YML
- script:
name: setup bower
code: sudo npm install bower -g
- script:
name: setup database
code: RAILS_ENV=test bin/rake db:migrate
- script:
name: setup emoji
code: bin/rake emoji
- script:
name: setup bower component
code: bin/rake bower:install['--allow-root']
- script:
name: rspec
code: bundle exec rspec
after-steps:
- wantedly/pretty-slack-notify:
webhook_url: $SLACK_WEBHOOK_URL
branches: ^master$
deploy:
steps:
- bundle-install:
jobs: 4
- script:
name: create .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_SSH_KEY_PRIVATE
- script:
name: set permissions for ssh key
code: chmod 0400 $HOME/.ssh/id_rsa
- cap:
stage: $WERCKER_DEPLOYTARGET_NAME
tasks: deploy
after-steps:
- wantedly/pretty-slack-notify:
webhook_url: $SLACK_WEBHOOK_URL