1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-28 10:47:23 +00:00

travis: add deploy step to automatically push the container image

Configure .travis.yml to automatically push builds on the master branch
to the container image registry (quay.io by default). This will
automatically make the latest "experimental" version of NFD, built from
the tip of the master branch, available in the upstream Docker
repository.

IMAGE_REPO_USER and IMAGE_REPO_PASSWORD environment variables must be
defined in the travis repositorys settings in order for the deployment
step to be triggered.
This commit is contained in:
Markus Lehtonen 2018-08-30 15:43:15 +03:00
parent 118146a1ee
commit 3088382772

View file

@ -1,7 +1,19 @@
language: minimal
env:
global:
# Sanitize git branch name into a valid docker tag name
- IMAGE_TAG_NAME=$(echo -n $TRAVIS_BRANCH | tr -c "[a-zA-Z0-9._'" "_")
services:
- docker
script:
- make image
- make image -e
deploy:
on:
branch: master
condition: -n "$IMAGE_REPO_USER"
provider: script
script: echo "$IMAGE_REPO_PASSWORD" | docker login -u "$IMAGE_REPO_USER" --password-stdin quay.io && make push -e