-
Notifications
You must be signed in to change notification settings - Fork 11
/
circle.yml
39 lines (39 loc) · 1.47 KB
/
circle.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
general:
artifacts:
- "coverage/lcov-report"
machine:
services:
- docker
dependencies:
pre:
- sudo apt-get update -qq
- sudo apt-get install -qq multiarch-support software-properties-common
- sudo apt-add-repository -y ppa:ansible/ansible
- sudo apt-get update -qq
- sudo apt-get install -qq libseccomp-dev libseccomp2:i386 jq ansible
- sudo pip install awscli boto
- npm install -g istanbul-coveralls
test:
pre:
- mkdir -p /tmp/contracts/
- yes US | openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/contracts/server.key -out /tmp/contracts/server.crt
- node_modules/knex/lib/bin/cli.js migrate:latest
- docker info
override:
- SSL_KEY=/tmp/contracts/server.key SSL_CERT=/tmp/contracts/server.crt CONTRACTS_STORAGE=/tmp/contracts/ npm test
- npm install -g codius
- docker build -t codius/codius-host:$CIRCLE_SHA1 .
- docker images
- docker run -v /tmp/contracts:/contracts -e SSL_KEY=/contracts/server.key -e SSL_CERT=/contracts/server.crt -d -p 8080:8080 codius/codius-host:$CIRCLE_SHA1; sleep 5
- ./test-contract-upload.sh
post:
- istanbul-coveralls
deployment:
docker:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USERNAME -p $DOCKER_PASSWORD
- docker tag codius/codius-host:$CIRCLE_SHA1 codius/codius-host:latest
- docker push codius/codius-host:$CIRCLE_SHA1
- docker push codius/codius-host:latest
- ./deploy-to-testnet.sh