forked from digitalocean/ceph_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
35 lines (29 loc) · 931 Bytes
/
.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
language: go
sudo: required
dist: trusty
go:
- 1.5
env:
- DOCKER_TAG=$TRAVIS_TAG
before_install:
- sudo apt-get update
- sudo apt-get install -y librados-dev librbd-dev
install:
- go get github.com/ceph/go-ceph
- go get github.com/prometheus/client_golang/prometheus
- go get golang.org/x/tools/cmd/cover
- go get github.com/axw/gocov/gocov
- go get github.com/modocache/gover
- go get github.com/mattn/goveralls
script:
- go test -coverprofile=collectors.coverprofile ./collectors
- $HOME/gopath/bin/gover
- $HOME/gopath/bin/goveralls -coverprofile=gover.coverprofile -service travis-ci
after_success:
- export DOCKER_REPO="digitalocean/ceph_exporter"
- if [ ! -z "$TRAVIS_TAG" ]; then
docker build -t $DOCKER_REPO:$DOCKER_TAG .;
docker tag $DOCKER_REPO:$DOCKER_TAG $DOCKER_REPO:latest;
docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
docker push $DOCKER_REPO;
fi