forked from skydive-project/skydive
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
69 lines (58 loc) · 2.73 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
language: go
go_import_path: github.com/skydive-project/skydive
go:
- 1.7
sudo: required
dist: trusty
before_install:
- sudo apt-get -qq update
- sudo apt-get install -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" -y openvswitch-switch unzip docker.io build-essential flex bison libxml2-dev libz-dev liblzma-dev libicu-dev libc++-dev bridge-utils libdb5.1-dev libgraph-easy-perl
- sudo ovs-vsctl show
- sudo iptables -F
- for i in $(find /proc/sys/net/bridge/ -type f) ; do echo 0 | sudo tee $i ; done
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- git clone https://github.com/the-tcpdump-group/libpcap.git
- cd libpcap
- git checkout libpcap-1.5.3
- ./configure --prefix=/usr/local --disable-shared --disable-dbus --disable-bluetooth --disable-canusb
- make
- sudo make install
- cd ..
- wget https://www.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.0.0.tar.gz
- tar -xvzf iproute2-4.0.0.tar.gz
- cd iproute2-4.0.0
- make
- sudo make install
- cd ..
- mkdir ${HOME}/protoc
- pushd ${HOME}/protoc
- wget https://github.com/google/protobuf/releases/download/v3.1.0/protoc-3.1.0-linux-x86_64.zip
- unzip protoc-3.1.0-linux-x86_64.zip
- popd
- export PATH=${HOME}/protoc/bin:${PATH}
- curl -O https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/2.3.0/elasticsearch-2.3.0.deb && sudo dpkg -i --force-confnew elasticsearch-2.3.0.deb && sudo service elasticsearch restart
script:
- export BUILD_TAG=$(date +%Y-%m-%d).${TRAVIS_JOB_NUMBER}
- make install
- make static
# - ARGS="-graph.output ascii" ./coverage.sh --coveralls
- echo "--- DOCKER IMAGE ---"
- make docker-image DOCKER_IMAGE=${DOCKER_IMAGE} DOCKER_TAG=${BUILD_TAG}
- sudo -E docker login -e "${DOCKER_EMAIL}" -u "${DOCKER_USERNAME}" -p "${DOCKER_PASSWORD}"
- sudo -E docker tag ${DOCKER_IMAGE}:${BUILD_TAG} ${DOCKER_IMAGE}:latest
- sudo -E docker push docker.io/${DOCKER_IMAGE}:${BUILD_TAG}
- sudo -E docker push docker.io/${DOCKER_IMAGE}:latest
- echo "--- BINARIES ---"
- git reset --hard
- git remote add binaries ${BINARIES_REPO}
- git fetch binaries
- git checkout -b travis-builds binaries/travis-builds
- git config --global user.email "builds@travis-ci.com"
- git config --global user.name "Travis CI"
- cp ${GOPATH}/bin/skydive skydive-latest
- git add skydive-latest
- git commit -m "${BUILD_TAG} travis build" --amend
- git config credential.helper "store --file=.git/credentials"
- echo "https://${GITHUB_USERNAME}:${GITHUB_TOKEN}@github.com" > .git/credentials
- git push -f -q binaries travis-builds