From: Mark Hansen Date: Sat, 20 Feb 2021 03:57:16 +0000 (+1100) Subject: Push Docker images to 'latest' tag too X-Git-Tag: 2.47.0~64^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=39267f4879f8f69a6c0e33ae1361dba71fb1df65;p=graphviz Push Docker images to 'latest' tag too We'll use this for caching soon Inspired by https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/ --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b6d19fd1a..9eda7bd00 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -585,9 +585,12 @@ deployment: - tags script: - cd ci/$IMAGE - # Build and push with git commit SHA + # Build and push with git commit SHA tag - docker build -t $CI_REGISTRY/graphviz/graphviz/$IMAGE:$CI_COMMIT_SHA . - docker push $CI_REGISTRY/graphviz/graphviz/$IMAGE:$CI_COMMIT_SHA + # Re-tag, push to :latest tag + - docker tag $CI_REGISTRY/graphviz/graphviz/$IMAGE:$CI_COMMIT_SHA $CI_REGISTRY/graphviz/graphviz:latest + - docker push $CI_REGISTRY/graphviz/graphviz:latest # Re-tag, backwards compatibility for the tests which are still using graphviz/graphviz:image-name - docker tag $CI_REGISTRY/graphviz/graphviz/$IMAGE:$CI_COMMIT_SHA $CI_REGISTRY/graphviz/graphviz:$IMAGE - docker push $CI_REGISTRY/graphviz/graphviz:$IMAGE