forked from k8snetworkplumbingwg/sriov-cni
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
37 lines (33 loc) · 761 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
language: go
sudo: required
go:
- "1.10"
env:
global:
- PATH=$GOROOT/bin:$GOPATH/bin:$PATH
script:
- make lint
- sudo -E env "PATH=$PATH" make test
- make build
- 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: docker push nfvpe/sriov-cni
on:
branch: master
# Push image to Dockerhub on tag
- provider: script
skip_cleanup: true
script: >
bash -c '
docker tag nfvpe/sriov-cni nfvpe/sriov-cni:$TRAVIS_TAG;
docker push nfvpe/sriov-cni:$TRAVIS_TAG;
echo foo'
on:
tags: true
all_branches: true
condition: "$TRAVIS_TAG =~ ^v[0-9].*$"