-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
48 lines (42 loc) · 2.23 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
language: go
services:
- docker
go:
- 1.8
go_import_path: github.com/specialedge/hangar-api
install:
- go get
- go get github.com/golang/lint/golint
script:
- go test -v $(go list ./... | grep -v /vendor/)
- golint -set_exit_status $(go list ./... | grep -v /vendor/)
- go build
after_success:
- test $TRAVIS_PULL_REQUEST = false
&& export REPO=specialedge/hangar-api
&& docker build -t $REPO:$COMMIT --build-arg GITSHA=$TRAVIS_COMMIT --build-arg BUILDDATE="`date`" .
&& docker tag $REPO:$COMMIT $REPO:travis-$TRAVIS_BUILD_NUMBER
&& if [[ "$TRAVIS_BRANCH" == "master" ]]; then docker tag $REPO:$COMMIT $REPO:latest; else docker tag $REPO:$COMMIT $REPO:$TRAVIS_BRANCH; fi
&& docker login -u $DOCKER_USER -p $DOCKER_PASS
&& docker push $REPO
env:
global:
- COMMIT=${TRAVIS_COMMIT::8}
- secure: "iR1bYb9UCA3og79lZjK8AqJvHon/4sa9VPidDgC3F+IRZArLgHuBzmzui85cGYyzgg9aORKTAm
RipmApbk7PpWfDWzGgW1qzowSy8YBvi1vE5hyAA9aA78MsDBUp5GWAOszjatvMJyoEqV/JwmM6FyyMWAmTH3M
G5JBqwmeyZCQKc6mNm5M2zyAj4oNRXqRcbvhRpZORPY/kJuxPL20lbHuABeGn7kGmBvHOciGQH8ON8TdMBxPT
kRhRSNtpVEUh9ZV+B6DeUqZtFbQUxjze2G15xXwY9oEetQ13BwKC2bChFQlyQBUoV7YFf+JWGGWnf5srMKBmt
AzpLdvMgN4W5LbHoxuFl2UEInwWz9k/KmjHYRxPKyt4MwPBXuyFU2mYiqJsJE03JTQwDOulRu0rM4vqP3iT1i
pu1ZniPekaVZhU9se0ya3DDvCYV/t31WG7B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