Skip to content

Commit

Permalink
Turn on automated deploy to docker hub. (#1)
Browse files Browse the repository at this point in the history
* Test deploy.

* Change docker login -u to --username.

* Add a dot.

* Add another missing character.

* Fix docker tag.

* docker push latest.

* Prepare to deploy.
  • Loading branch information
jeffFranklin authored Feb 6, 2019
1 parent 390fa84 commit 08612d6
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
language: python
python:
- '3.6'
env:
- DOCKER_IMAGE=jeffrouw/nginx-saml-proxy
install:
- echo "$DOCKER_PASSWORD" | docker login --username "$DOCKER_USERNAME" --password-stdin
- export TAG=$(git describe --tags)
- if docker pull "$DOCKER_IMAGE" ; then export BUILD_OPTS=--cache-from="$DOCKER_IMAGE" ; fi
script:
- docker build $BUILD_OPTS -t "$DOCKER_IMAGE" . || travis_terminate 1
- docker tag "$DOCKER_IMAGE" "$DOCKER_IMAGE:$TAG"
deploy:
skip_cleanup: true
provider: script
script: docker push "$DOCKER_IMAGE:$TAG" && docker push "$DOCKER_IMAGE"
on:
tags: true

0 comments on commit 08612d6

Please sign in to comment.