forked from k8snetworkplumbingwg/whereabouts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
56 lines (49 loc) · 2.02 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
language: go
dist: trusty
sudo: false
go:
- 1.13.x
env:
global:
- secure: "dBdxB+wVWCoYTHQS9VCs4DmV9Di9QFwAjDJzzlAvqhd8tlnzYsQzLu88+9h80gf6hDMOvJtlmAPn5Pjs5lJ1HF5ethmoDpOkoR76AyGoCT6l85XKXOhix4wGHLMXieOdD5LBEL+lkNeRXDFLs43hGbXp0TPAHaGhGfqXq38FePL/c0Dd45UFmGAXKo1ygDRhNiFNl4S3lFLkKdqhohYxY6Qf7jdSkq3WHMdzX3By9i+3B2ExMFo50mIMM6z7h8jHSGEMVi8aTN0HRIB15NBIhkqI2PlHeSfsInAgGgDPvVFS+aDoSUnXVajzyUDcuwdV4cqNou1r+u+8oMxUiqehrWmf2lacawnmNm/TyPhPi9g8dLLWjLLhJpnY/v281jDO82psb4sV1rldNlFG6k2BT17szcpctgaSE+psVgKo/yexQsEBO+c+d8CxeuZ/FGbXuI0W9Rmdq67ys031PyNbQFTizBOzgHagVDYbzfL4ebAsqtUj/tFez9/lKVg2tGGXIeMBCM2bps1GTzuIRUFStsOh8cXw/xGYoNCANl+yXoZYwdwUvHlOfkMUxBiy/6TJWZSOhnRdJIzVIG/F01DmbM5JCnf6oXPSMAnVB2rnwrxBbWYmh12lvjkLnIP5cIrFTzsQW1FAFfchytptj4bKaULHqGsINdU+lI392fC4Pp0="
before_install:
- go get github.com/mattn/goveralls
install:
- go get -u golang.org/x/lint/golint
- ./hack/install-kubebuilder-tools.sh
before_script:
- ./hack/generate-code.sh
# - bash -c 'git diff pkg/ doc/ && git diff-index --quiet HEAD -- pkg/ doc/'
- golint pkg/... cmd/...
- go vet */*.go
- test -z $(gofmt -l pkg/. cmd/.)
script:
- ./hack/test-go.sh
- ./hack/build-go.sh
- KUBEBUILDER_ASSETS="$(pwd)/bin" $GOPATH/bin/goveralls -service=travis-ci
- docker build -t dougbtv/whereabouts .
- docker build -t dougbtv/whereabouts-ocp -f Dockerfile.openshift .
- docker images
deploy:
# Push images to Dockerhub on merge to master
- provider: script
on:
branch: master
script: >
bash -c '
docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS";
docker push dougbtv/whereabouts:latest;
docker push dougbtv/whereabouts-ocp:latest;
echo done'
- provider: script
skip_cleanup: true
script: >
bash -c '
docker tag dougbtv/whereabouts:latest dougbtv/whereabouts:$TRAVIS_TAG;
docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS";
docker push dougbtv/whereabouts:$TRAVIS_TAG;
echo done'
on:
tags: true
all_branches: true
condition: "$TRAVIS_TAG =~ ^v[0-9].*$"