forked from cloudfoundry/firehose_exporter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
41 lines (35 loc) · 2.5 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
sudo: required
language: go
go:
- 1.12.x
go_import_path: github.com/bosh-prometheus/firehose_exporter
services:
- docker
jobs:
include:
- stage: Run tests
script: make test
- stage: Build docker image
env:
- DOCKER_IMAGE_NAME=boshprometheus/firehose-exporter
- secure: MiaqIB2jkGy2yOLXZPw7Yu7rQDAg0MOFQosAgqdNqRubqfvO5KWuHMkU8EW5QRvQC12xc7g/xNKzC+ZFNIpDhPk6HyCMbef5xgm7zZVrdwCgWrj5kCUQOzbwgFJJTwNSqtRUV2a/1fyGdJPMt0aGwb3zk1p2al81in/glVf144F5M6nUe1HS/uUc7ALuvG0k6cxkTKmOcB0+KlDfUwBoA7bnud60MBgzVxgbhyQHcvPZiGK9Swf+AXuqP9A86W/IpuBMeshJbKivWGmw2cqqBOmQ1SU5y/UnI7zYMDDbOmCHpWOGdhW7oqgfJC9oIjT6Jt0PzVgyk841XA3EMtWtMxPgTfc4GWhiHZhG7QG1Wmwy6gV81EBtgyqiXgpFEmk7PlMdcB04/VAEeKQnKHu8UOTveU3CvGMj3oiG7CtKhnIUi5kzPDTntQYu8BkdsbszcodQ8VknH6rlQkVa8RO3yfRrAiJSGIbwYwfOsH1ouJhozTaOlgthYE/siT8oeYqaEOqS8JNVEl4w9N6RZQHCEu6e0ZuvzBrKSRZADslcE5gXJnlpxSWuiXiPI1ZR6bJdglfWlTnndxldSWLJW8ff8cx/SE/fqRR1tb/whVKQYnoSfzfrrj1/RhZa40PUC7ccIP34An47BRFYlSiEn0ZTwo5xXg7fZ79fCWtkj/KFqYE=
- secure: kzOjQGRX/g1XoRUNzWZpteZLLtzvrEDLG7VdGYJ7Ml+ImxkE0IsoVOh10455DXk9HRXllr0ftYJXm+LOM+aNjsLfQ4TnmjEWZYxGm/rz4BfgslqXzfd+ZW6QIUrlg/mLwgrlZGq+Ztv8SHqmWSc2Z8CFcBc8KnWSONRYPPDIjtN7WVCm36826lAE1L8RNn8e22J0oT7BkLRT0PQF4A/5fGIyJ8pJomgEYzCgmQCutVwSuYyYBqwJNxEwyWc2uYXaYILRbiGMYEOpAi+hgm5ZT4u6LWJQZbda8tjyUpTyeoKvc1g4NKcACHHFLCAh7YccPyfTMSArXenyWcph4wI9j/vtc32Pcu+lL/3tY6VxdseMcMKEjHvdjpUnPhdta43AC3ANWzI2Osofm1AeAFzoCQmnV4vWjtdu1tZEOBuL3GV/4HaUgawa8FVTJ3KPTOiv68lYsEoZonG1wlEFg1Mt25t3X9mIlhyTr6dRf3ygKMkWIaI6D7GGVpMbA8TnoDOlwQ2ViZrofRKlDIrxeEB0i3+IBs8qHSIriYTfVG0GbIrsUT09mhAfepCKWHN1refOYZMxP9T5tslFzZNC4decdnI6bH4nNnWlZwgjjbmxAr4f5ngj9bYRYssDmpew5b4NxrtgQ3rU/im4Jt9ZdmfhshNxnTOr/RQkG9bRyQzXwSM=
script:
- make crossbuild
- ln -s .build/linux-amd64/firehose_exporter firehose_exporter
- |
if [ -n "$TRAVIS_TAG" ]; then
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME DOCKER_IMAGE_TAG=$TRAVIS_TAG
else
make docker DOCKER_IMAGE_NAME=$DOCKER_IMAGE_NAME DOCKER_IMAGE_TAG=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
fi
- |
if [[ "$TRAVIS_TAG" =~ ^v[0-9]+(\.[0-9]+){2}$ ]]; then
docker tag "$DOCKER_IMAGE_NAME:$TRAVIS_TAG" "$DOCKER_IMAGE_NAME:latest"
fi
- docker images
- |
if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
docker push $DOCKER_IMAGE_NAME
fi