Merge pull request #194 from intel/travis-ci

Travis
This commit is contained in:
Doug Smith 2018-11-19 11:35:58 -05:00 committed by GitHub
commit 6ffd60d289
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,6 +6,7 @@ dist: trusty
env: env:
global: global:
- REGISTRY_USER=${REGISTRY_USER} - REGISTRY_USER=${REGISTRY_USER}
- REGISTRY_PASS=${REGISTRY_PASS}
- secure: "${REGISTRY_SECURE}" - secure: "${REGISTRY_SECURE}"
before_install: before_install:
@ -45,18 +46,29 @@ deploy:
tags: true tags: true
all_branches: true all_branches: true
condition: "$TRAVIS_TAG =~ ^v[0-9].*$" condition: "$TRAVIS_TAG =~ ^v[0-9].*$"
# Push images to Dockerhub # Push images to Dockerhub on tag
- provider: script - provider: script
script: > script: >
bash -c ' bash -c '
docker tag nfvpe/multus nfvpe/multus:$TRAVIS_TAG; docker tag nfvpe/multus nfvpe/multus:$TRAVIS_TAG;
docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS"; docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS";
docker push nfvpe/multus; docker push nfvpe/multus;
docker push nfvpe/multus:$TRAVIS_TAG' docker push nfvpe/multus:$TRAVIS_TAG;
echo foo'
on: on:
tags: true tags: true
all_branches: true all_branches: true
condition: "$TRAVIS_TAG =~ ^v[0-9].*$" condition: "$TRAVIS_TAG =~ ^v[0-9].*$"
# Push images to Dockerhub on merge to master
- provider: script
on:
branch: master
script: >
bash -c '
docker tag nfvpe/multus nfvpe/multus:snapshot;
docker login -u "$REGISTRY_USER" -p "$REGISTRY_PASS";
docker push nfvpe/multus:snapshot;
echo foo'
after_success: after_success:
# put build tgz to bintray # put build tgz to bintray