-
Notifications
You must be signed in to change notification settings - Fork 87
/
Copy path.travis.yml
67 lines (57 loc) · 1.87 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
language: go
sudo: required
dist: bionic
go:
- 1.13
services:
- docker
before_install:
- sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install docker-ce
- sudo apt-get install golang -y
- docker version
- curl -s https://packages.confluent.io/deb/5.2/archive.key | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://packages.confluent.io/deb/5.2 stable main"
- sudo apt-get update
install:
- sudo apt-get install dnsmasq python librdkafka-dev -y
- sudo pip install botocore
- sudo sed -i "$ a\address=/.s3.test.com/10.5.0.18" /etc/dnsmasq.conf
- sudo sed -i "$ a\address=/.s3-internal.test.com/10.5.0.18" /etc/dnsmasq.conf
- sudo service dnsmasq restart
- sudo sed -i "1 i\nameserver 127.0.0.1" /etc/resolv.conf
- sudo ufw disable
script:
- export GOPROXY=https://goproxy.cn
- export GO111MODULE=on
- make integrate
# golang 1.12 will change the permission of go.mod and go.sum
# use chmod to reset the permission of go.mod and go.sum to make go test happy
- sudo chmod 644 go.mod go.sum
- sudo python test/sanity.py
- pushd test/go
- go test -v
- popd
- cat lc.log
before_deploy:
- echo "prepare package"
- sudo make pkg
- sudo make image
deploy:
- provider: releases
api_key: $GithubToken
file: $TRAVIS_BUILD_DIR/yig*.x86_64.rpm
file_glob: true
skip_cleanup: true
on:
repo: journeymidnight/yig
tags: true
- provider: script
script: echo "$DOCKER_PASSWORD"|docker login -u "$DOCKER_USERNAME" --password-stdin && docker tag journeymidnight/yig journeymidnight/yig:$TRAVIS_TAG && docker push journeymidnight/yig:$TRAVIS_TAG
on:
repo: journeymidnight/yig
tags: true
- provider: script
script: echo "$DOCKER_PASSWORD"|docker login -u "$DOCKER_USERNAME" --password-stdin && docker push journeymidnight/yig
on:
repo: journeymidnight/yig
branch: master