Skip to content

Commit

Permalink
update .travis.yml for docker image build
Browse files Browse the repository at this point in the history
This update will docker images in travis-ci.

Change-Id: I60d7d75708ba3bd54831cfccad5e8337c750f516
  • Loading branch information
ahalimx86 authored and zshi-redhat committed Jun 12, 2019
1 parent 5ebe37c commit 00ec040
Showing 1 changed file with 26 additions and 7 deletions.
33 changes: 26 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,31 @@ env:
global:
- PATH=$GOROOT/bin:$GOPATH/bin:$PATH

before_install:
# Install Glide
- mkdir -p "${GOPATH}/bin"
- curl https://glide.sh/get | bash
- go get -v golang.org/x/lint/golint

script:
- make
- 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].*$"

0 comments on commit 00ec040

Please sign in to comment.