summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Meier <r.meier@siemens.com>2019-10-24 19:36:09 +0200
committerGitHub <noreply@github.com>2019-10-24 19:36:09 +0200
commitac2266b66553cec11740bd5246e23d649606b5ef (patch)
treeb8396e6716dce9ecb834e36043715b342239ef90
parent8cb5488142ca7fc7563fac65b434b672a14369fc (diff)
parent01cbc7ad04a875bea93a08c0ce563ab5b4fe896b (diff)
downloadgitlab-ac2266b66553cec11740bd5246e23d649606b5ef.tar.gz
Merge pull request #922 from python-gitlab/chore/latest-docker-image
chore(ci): update latest docker image for every tag
-rw-r--r--.gitlab-ci.yml11
1 files changed, 11 insertions, 0 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 3582693..b91d88f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -2,6 +2,7 @@ image: python:3.7
stages:
- deploy
+ - deploy-latest
deploy:
stage: deploy
@@ -28,3 +29,13 @@ deploy_image:
- /kaniko/executor --context $CI_PROJECT_DIR --dockerfile $CI_PROJECT_DIR/Dockerfile --destination $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
only:
- tags
+
+deploy-latest:
+ stage: deploy-latest
+ image: golang:1.12.4-stretch
+ script:
+ - go get github.com/google/go-containerregistry/cmd/crane
+ - mkdir /root/.docker && echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /root/.docker/config.json
+ - crane cp $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG $CI_REGISTRY_IMAGE:latest
+ only:
+ - tags