forked from hyperledger-archives/burrow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
89 lines (82 loc) · 3.83 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
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
77
78
79
80
81
82
83
84
85
86
machine:
environment:
GOPATH: $HOME/.go_workspace
REPO: ${GOPATH}/src/github.com/${CIRCLE_PROJECT_USERNAME}/${CIRCLE_PROJECT_REPONAME}
DOCKER_VERSION: 1.9.1
DOCKER_MACHINE_VERSION: 0.6.0
ERIS_CLI_BRANCH: develop
GO15VENDOREXPERIMENT: 1
post:
- git config --global user.email "billings@erisindustries.com"
- git config --global user.name "Billings the Bot"
- rm -rf ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}
- mkdir -p ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}
- cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME} ${GOPATH%%:*}/src/github.com/${CIRCLE_PROJECT_USERNAME}/.
dependencies:
override:
- sudo curl -L -o /usr/bin/docker http://s3-external-1.amazonaws.com/circle-downloads/docker-$DOCKER_VERSION-circleci; sudo chmod 0775 /usr/bin/docker; sudo usermod -a -G docker $USER; true
- sudo service docker start
# - sudo curl -sSL -o /usr/local/bin/docker-machine https://github.com/docker/machine/releases/download/v$DOCKER_MACHINE_VERSION/docker-machine-linux-x86_64; sudo chmod 0755 /usr/local/bin/docker-machine
# - "go get github.com/eris-ltd/eris-cli/cmd/eris; cd ${GOPATH%%:*}/src/github.com/eris-ltd/eris-cli && git checkout origin/$ERIS_CLI_BRANCH && go install ./cmd/eris"
- "sudo apt-get update && sudo apt-get install -y libgmp3-dev"
# jq and curl is a dependency for the integration framework
- sudo apt-get install jq curl && go get github.com/Masterminds/glide
test:
pre:
- cd $REPO && glide install
# Test the build target for eris-db
- echo "Build target eris-db..." && cd $REPO && go install ./cmd/eris-db && eris-db --help
# Test the build target for eris-client
- echo "Build target eris-client..." && cd $REPO && go install ./client/cmd/eris-client && eris-client --help
override:
# We only wish to test our packages not vendored ones
- echo "Running unit tests..." && cd $REPO && glide novendor | xargs go test -tags integration
# - echo "Running integration tests..." && cd $REPO && "tests/circle_test.sh" # | tee $CIRCLE_ARTIFACTS/output.log; test ${PIPESTATUS[0]} -eq 0"
deployment:
release-0.12:
branch: release-0.12
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with the version
- tests/build_tool.sh
- docker push quay.io/eris/db
# push the updated documentation
- docs/build.sh
release-0.16:
branch: release-0.16
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with the version
- tests/build_tool.sh
- docker push quay.io/eris/db
# push the updated documentation
- docs/build.sh
develop:
branch: develop
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with the version
- tests/build_tool.sh
- docker push quay.io/eris/db
master:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with ':latest'
# builds on master are considered immutable so we do not push the version
# tag to allow for hotfixes
- tests/build_tool.sh latest
- docker push quay.io/eris/db
# push the updated documentation and replace latest
- docs/build.sh latest
tagged-releases:
tag: /v[0-9]+(\.[0-9]+)*/
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS quay.io
# build docker image and tag the image with the version;
# once the commit is tagged the docker image for this version tag is
# considered immutable.
- tests/build_tool.sh
- docker push quay.io/eris/db
# push the updated documentation
- docs/build.sh