forked from k8snetworkplumbingwg/rdma-cni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
44 lines (38 loc) · 878 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
36
37
38
39
40
41
42
43
44
language: go
sudo: required
go:
- "1.13"
env:
global:
- PATH=$GOROOT/bin:$GOPATH/bin:$PATH
before_script:
- go get -u github.com/mattn/goveralls
script:
- make lint
- make test-coverage
- goveralls -coverprofile=rdma-cni.cover -service=travis-ci
- make image
before_deploy:
- docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS"
deploy:
# Push image to Dockerhub on merge to master
- provider: script
skip_cleanup: true
script: >
bash -c '
docker push $IMAGE_NAME
echo Done'
on:
branch: master
# Push image to Dockerhub on tag
- provider: script
skip_cleanup: true
script: >
bash -c '
docker tag $IMAGE_NAME $IMAGE_NAME:$TRAVIS_TAG;
docker push $IMAGE_NAME:$TRAVIS_TAG;
echo Done'
on:
tags: true
all_branches: true
condition: "$TRAVIS_TAG =~ ^v[0-9].*$"