]> granicus.if.org Git - graphviz/commitdiff
Push Docker images to 'latest' tag too
authorMark Hansen <markhansen@google.com>
Sat, 20 Feb 2021 03:57:16 +0000 (14:57 +1100)
committerMark Hansen <markhansen@google.com>
Sat, 20 Feb 2021 03:57:16 +0000 (14:57 +1100)
We'll use this for caching soon

Inspired by
https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/

.gitlab-ci.yml

index b6d19fd1abc5f3e976b9a74f0ad839caf1d8af24..9eda7bd006e50b017626a864006849b625667300 100644 (file)
@@ -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