From e616f004a17cc83ea014b3a8676d8fe50a2968f6 Mon Sep 17 00:00:00 2001 From: Aleksandr Volochnev Date: Thu, 22 Aug 2019 15:04:05 +0200 Subject: [PATCH 1/4] Updated travis.yaml --- .travis.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 2a04370..80530e0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,11 +5,14 @@ python: # Build the docker image script: -- ./scripts/docker-build.sh +- docker build -t ${TRAVIS_COMMIT} . # If successful, see if we need to publish also after_success: -- ./scripts/travis-publish.sh +- test -z $TRAVIS_TAG && travis_terminate 0 +- docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:${TRAVIS_TAG} +- docker login -u $DOCKER_USER -p $DOCKER_PASS +- docker push killrvideo/killrvideo-python:${TRAVIS_TAG} # Sudo required for doing docker build sudo: required From 5f087784c8a6592669805225abb62389871fc271 Mon Sep 17 00:00:00 2001 From: Aleksandr Volochnev Date: Mon, 26 Aug 2019 18:41:57 +0200 Subject: [PATCH 2/4] Added push for latest image if tag is latest --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 80530e0..83e8889 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,6 +13,7 @@ after_success: - docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:${TRAVIS_TAG} - docker login -u $DOCKER_USER -p $DOCKER_PASS - docker push killrvideo/killrvideo-python:${TRAVIS_TAG} +- [ $(git tag --sort=-v:refname | grep -E '^\d+.\d+.\d+$' | head -n1) == $TRAVIS_TAG ] && { docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:latest; docker push killrvideo/killrvideo-python:latest } || echo 'Not latest image, skipping push...' # Sudo required for doing docker build sudo: required From 4df1e088be7f39fd35ef006058d97b62cc97ee67 Mon Sep 17 00:00:00 2001 From: Aleksandr Volochnev Date: Mon, 26 Aug 2019 18:49:08 +0200 Subject: [PATCH 3/4] Hotfix --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 83e8889..d29d7a5 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,7 +13,7 @@ after_success: - docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:${TRAVIS_TAG} - docker login -u $DOCKER_USER -p $DOCKER_PASS - docker push killrvideo/killrvideo-python:${TRAVIS_TAG} -- [ $(git tag --sort=-v:refname | grep -E '^\d+.\d+.\d+$' | head -n1) == $TRAVIS_TAG ] && { docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:latest; docker push killrvideo/killrvideo-python:latest } || echo 'Not latest image, skipping push...' +- [ $(git tag --sort=-v:refname | grep -E '^\d+.\d+.\d+$' | head -n1) == "$TRAVIS_TAG" ] && docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:latest; docker push killrvideo/killrvideo-python:latest # Sudo required for doing docker build sudo: required From 1bd4122daf38d255e25114936c46332e081d573f Mon Sep 17 00:00:00 2001 From: Aleksandr Volochnev Date: Mon, 26 Aug 2019 22:34:34 +0200 Subject: [PATCH 4/4] Fixed travis.yaml --- .travis.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index d29d7a5..4c9e8b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,24 +1,23 @@ dist: xenial # required for Python >= 3.7 language: python python: -- "3.7" + - "3.7" # Build the docker image script: -- docker build -t ${TRAVIS_COMMIT} . + - docker build -t ${TRAVIS_COMMIT} . # If successful, see if we need to publish also after_success: -- test -z $TRAVIS_TAG && travis_terminate 0 -- docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:${TRAVIS_TAG} -- docker login -u $DOCKER_USER -p $DOCKER_PASS -- docker push killrvideo/killrvideo-python:${TRAVIS_TAG} -- [ $(git tag --sort=-v:refname | grep -E '^\d+.\d+.\d+$' | head -n1) == "$TRAVIS_TAG" ] && docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:latest; docker push killrvideo/killrvideo-python:latest - + - test -z $TRAVIS_TAG && travis_terminate 0 + - docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:${TRAVIS_TAG} + - docker login -u $DOCKER_USER -p $DOCKER_PASS + - docker push killrvideo/killrvideo-python:${TRAVIS_TAG} + - "[ $(git tag --sort=-v:refname | grep -E '^\\d+.\\d+.\\d+$' | head -n1) == \"$TRAVIS_TAG\" ] && docker tag ${TRAVIS_COMMIT} killrvideo/killrvideo-python:latest; docker push killrvideo/killrvideo-python:latest" # Sudo required for doing docker build sudo: required services: -- docker + - docker env: global: