From e8684360ea42d91624cf3ebcc521217143777032 Mon Sep 17 00:00:00 2001 From: GilbN Date: Wed, 23 Sep 2020 22:00:29 +0200 Subject: [PATCH] Create .travis.yml --- .travis.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..0ef89fe --- /dev/null +++ b/.travis.yml @@ -0,0 +1,28 @@ +os: linux + +language: shell + +branches: + only: + - master + +services: + - docker + +env: + global: + - DOCKERHUB="gilbn/geoip2influx" + +jobs: + include: + - stage: BuildImage + if: (NOT (type IN (pull_request))) + script: + # Build image + - docker build --no-cache -t ${DOCKERHUB}:${TRAVIS_COMMIT} . + - docker tag ${DOCKERHUB}:${TRAVIS_COMMIT} ${DOCKERHUB}:latest + # Login to DockerHub + - echo $DOCKERPASS | docker login -u $DOCKERUSER --password-stdin + # Push all of the tags + - docker push ${DOCKERHUB}:${TRAVIS_COMMIT} + - docker push ${DOCKERHUB}:latest