forked from kubevirt/kubevirt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
63 lines (56 loc) · 3.26 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
language: go
go_import_path: kubevirt.io/kubevirt
sudo: required
dist: trusty
services:
- docker
go:
- 1.7.5
- 1.8.x
- tip
# jacob/virtualisation has updated libvirt binaries. Since
# the statically linked libvirt-go code requires a runtime version of libvirt
# no-lower than what was used when the binary was built.
before_install:
- sudo add-apt-repository ppa:jacob/virtualisation -y
- sudo apt-get update -q
install:
- git reset --hard # we are caching the vendor folder, make sure we see the new vendor.json file
- go get github.com/mattn/goveralls
- go get -u github.com/Masterminds/glide
- go get golang.org/x/tools/cmd/goimports
- go get -u github.com/golang/mock/gomock
- go get -u github.com/rmohr/mock/mockgen
- go get -u github.com/rmohr/go-swagger-utils/swagger-doc
- sudo apt-get install libvirt-dev make
- make sync
script:
- make fmt
- if git diff --name-only | grep '.*.go'; then echo "It seems like you did not run `make fmt`. Please run it and commit the changes"; false; fi
- make generate
- make fmt
- if git diff --name-only | grep 'generated.*.go'; then echo "Content of generated files changed. Please regenerate and commit them."; false; fi
- if diff <(git grep -c '') <(git grep -cI '') | egrep -v 'docs/.*\.png|swagger-ui' | grep '^<'; then echo "Binary files are present in git repostory."; false; fi
- make check
- make build
- if [[ $TRAVIS_REPO_SLUG == "kubevirt/kubevirt" ]]; then $HOME/gopath/bin/goveralls -service=travis-ci -package=./pkg/...; else make test; fi
cache:
directories:
- vendor
deploy:
- provider: script
script: docker login -u="$DOCKER_USER" -p="$DOCKER_PASS" && make publish
skip_cleanup: true
on:
branch: master
go: 1.7.5
- provider: script
script: docker login -u="$DOCKER_USER" -p="$DOCKER_PASS" && make publish DOCKER_TAG=$TRAVIS_TAG
skip_cleanup: true
on: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