-
Notifications
You must be signed in to change notification settings - Fork 13
/
wercker.yml
42 lines (42 loc) · 1.49 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
box: wercker-labs/docker
build:
steps:
- script:
name: upgrade docker
code: |
which docker
mkdir tmp
curl https://get.docker.com/builds/Linux/x86_64/docker-latest -o tmp/docker
chmod +x tmp/docker
sudo service docker stop
sudo cp tmp/docker /usr/bin/docker
sudo service docker start
docker -v
- script:
name: update packages
code: |
sudo sed -i -E 's/http:\/\/.+\.archive.ubuntu.com/http:\/\/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo sed -i -E 's/security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
sudo apt-get update
- script:
name: install ruby for slack notification
code: sudo apt-get install -y ruby
- script:
name: docker build
code: docker build -t pool-server ./docker/pool
- script:
name: run pool container
code: |
sudo docker run -d -v /var/run/docker.sock:/var/run/docker.sock --name pool pool-server
- script:
name: run system test
code: |
sudo docker exec pool sh -c "cd /tmp/builder && /opt/ruby-2.1.2/bin/bundle exec rspec --tag system_test; exit"
- script:
name: run system test with infrataster, serverspec
code: |
sudo docker exec pool sh -c "cd /app/tests && ./test.sh; exit"
after-steps:
- wantedly/pretty-slack-notify:
webhook_url: $SLACK_WEBHOOK_URL
channel: wercker