forked from CyberMiles/travis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
89 lines (79 loc) · 2.54 KB
/
.travis.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
87
88
89
language: go
branches:
only:
- master
- develop
- staging
- tmup
- lity
- /^v.*$/
services:
- docker
addons:
hosts:
- node-1
- node-2
- node-3
- node-4
- node-5
- node-6
before_install:
- echo Checking whether $TRAVIS_COMMIT_RANGE changed only docs
- |
if [ -z "$TRAVIS_TAG" ]; then
git diff --name-only $TRAVIS_COMMIT_RANGE | grep -qvE '(\.md$|^(docs)/)' || {
echo "Only docs were updated, stopping build process."
exit
}
fi
install:
- ". $HOME/.nvm/nvm.sh"
- nvm install stable
- nvm use stable
- npm install
script:
- make docker_image
- docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD ;
- TAG=$TRAVIS_BRANCH make push_tag_image ;
- |
if [ -z "$TRAVIS_TAG" ]; then
./test/integration/test.sh
fi
after_success:
- if [[ "$TRAVIS_BRANCH" == "master" ]]; then
make push_image ;
fi
after_failure:
- curl -i "http://localhost:26657/dump_consensus_state"
- >
curl -X POST http://localhost:8545
-H 'Content-Type: application/json'
-d '{"jsonrpc":"2.0","id":1,"method":"cmt_queryValidators", "params": [0]}'
- cd ~/volumes/testnet/travis/scripts && docker-compose logs -t --tail 50
before_deploy:
- BUILD_TAG=$TRAVIS_TAG make dist
- |
if [[ "$TRAVIS_TAG" =~ ^v[0-9]+.[0-9]+.[0-9]+ ]]; then
export BODY=https://github.com/CyberMiles/travis/blob/develop/CHANGELOG.md#${TRAVIS_TAG//.}
export PRE=false
elif [[ "$TRAVIS_TAG" =~ ^v ]]; then
export BODY="release for ${TRAVIS_TAG:1}"
export PRE=true
else
export BODY="release for ${TRAVIS_TAG}"
export PRE=true
fi
deploy:
provider: releases
overwrite: true
api-key:
secure: iIaBQLDBPzi95sIt36XaOaSrD7hwB/dUxAfpCeFLoFqdGNsGZhaPp4XfW8UghwqNlUF9spW1Ri8uOMF2Ig3FBTmeL/GELJl8pSJwhjb3Ra3p+kGg5eKyIZMvK1m9uoXBBMlMnjPhS9h0Z8bOpXLiEpQASV6nnJ0KE2N39ff3jBKShWDNWejOAYBTNNJ9N7GF8gh6z/xLwZ82nLWmOYGkwrEA9fH93IzguehmUyD2bbU66un0QrRfUCQ8xruxTENZ9ATz7GqOrqYe0L+IUbmK10VIYlJ1S7PcWvBSY4J4nslLnpFw2m+/3Zt2Cq/xaCLs7bmOlMie0AEbtyGamXxEIlNcIeWeOIyXv0k4yqGm5+IUl2scggDXGmysXCjwbQbLnPbHXo0sYlNMUr4WkH2LlPENT9r4mQGDwOYkrwt0ZlU9n+67IpgTBuBqd//khzmnjdDPleWZyr6fOfjfA8uBGbcO8fANyJOAzoPQQtKp7crzhyt2aVZB2M7JAGsJCr1TUZl9Y2KgAKkCQnpwBAZdntUB0DvodBFqVG61zaH4yY6k+5kiHC+kZ9gSqoh3gMoMlANRqaoIB+3IVf1TXWyVx4dp11RGCBxNmccvA1h+RsI8GXsCPSLYINiQLKWUl3jmNYbmQKK7TyWWl/soCTco6NnyivLp6cxbDi0zqy5xTDc=
skip_cleanup: true
file_glob: true
file: "build/dist/*"
name: Travis $TRAVIS_TAG
body: $BODY
prerelease: $PRE
on:
repo: CyberMiles/travis
tags: true