forked from k8snetworkplumbingwg/sriov-network-device-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
54 lines (48 loc) · 1.47 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
language: go
go:
"1.13"
matrix:
include:
- name: amd64
os: linux
env: ARCH=amd64
# - name: ppc64le
# os: linux-ppc64le
# env:
# - ARCH=ppc64le
# - DOCKERFILE=images/Dockerfile.ppc64le
before_install:
- sudo apt-get update -qq
- sudo systemctl restart docker
script:
- make test
- make build
- make
- make image TAG="$REGISTRY_USER/sriov-device-plugin"
before_deploy:
- docker login -u "$LOGIN_USER" -p "$REGISTRY_PASS"
deploy:
# Push image to Dockerhub on merge to master
- provider: script
skip_cleanup: true
script: >
bash -c '
if [[ "${ARCH}" == "amd64" ]]; then docker push $REGISTRY_USER/sriov-device-plugin; fi;
docker tag $REGISTRY_USER/sriov-device-plugin $REGISTRY_USER/sriov-device-plugin:$ARCH;
docker push $REGISTRY_USER/sriov-device-plugin:$ARCH;
echo done'
on:
branch: master
# Push image to Dockerhub on tag
- provider: script
skip_cleanup: true
script: >
bash -c '
if [[ "${ARCH}" == "amd64" ]]; then docker tag $REGISTRY_USER/sriov-device-plugin $REGISTRY_USER/sriov-device-plugin:"$TRAVIS_TAG"; docker push $REGISTRY_USER/sriov-device-plugin:"$TRAVIS_TAG"; fi;
docker tag $REGISTRY_USER/sriov-device-plugin $REGISTRY_USER/sriov-device-plugin:"$TRAVIS_TAG-$ARCH";
docker push $REGISTRY_USER/sriov-device-plugin:"$TRAVIS_TAG-$ARCH";
echo done'
on:
tags: true
all_branches: true
condition: "$TRAVIS_TAG =~ ^v[0-9].*$"