Create .travis.yml

This commit is contained in:
GilbN 2020-09-23 22:00:29 +02:00 committed by GitHub
parent b5d68b4b96
commit e8684360ea
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

28
.travis.yml Normal file
View file

@ -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