Push Container with :deploy on commits to master

This commit is contained in:
Daniel Schädler 2019-11-21 17:39:06 +01:00
parent 85f5026ff0
commit 6a815c455f
1 changed files with 14 additions and 0 deletions

View File

@ -31,3 +31,17 @@ kubernetes:
- kubectl config set-context local --cluster=k8s --user=sa --namespace=turniere-frontend
- gem install kubernetes-deploy --version '=0.29.0'
- REVISION=$CI_COMMIT_SHA kubernetes-deploy --template-dir kubernetes turniere-frontend local
deploy_watchtower:
tags:
- docker
stage: deploy
only:
- master
image: docker
services:
- docker:dind
script:
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE/production:deploy
- docker push $CI_REGISTRY_IMAGE/production:deploy