From b94649059fccc336b35398c5ce694c50f5d1d59a Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Tue, 25 Sep 2018 15:30:52 +0200 Subject: [PATCH] Tag images with commit SHA Signed-off-by: Pavol Loffay --- scripts/travis/upload-to-docker.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/travis/upload-to-docker.sh b/scripts/travis/upload-to-docker.sh index ba2df97c0e1..30cc9f21c43 100644 --- a/scripts/travis/upload-to-docker.sh +++ b/scripts/travis/upload-to-docker.sh @@ -18,7 +18,9 @@ else # TODO why do we do /// ? TAG="${BRANCH///}" fi -echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, REPO=$REPO, BRANCH=$BRANCH, TAG=$TAG, IMAGE=$IMAGE" +echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, REPO=$REPO, BRANCH=$BRANCH, TAG=$TAG, IMAGE=$IMAGE, SHA=$TRAVIS_COMMIT" + +docker tag $IMAGE $REPO:$TRAVIS_COMMIT # add major, major.minor and major.minor.patch tags if [[ -n $major ]]; then