deploy stage added

This commit is contained in:
Wolfgang Hottgenroth 2021-09-21 16:06:58 +02:00
parent bb2f3de982
commit c349defdeb

View File

@ -1,5 +1,27 @@
stages:
- check
- build
- deploy
include: include:
- project: dockerized/commons - project: dockerized/commons
ref: master ref: master
file: gitlab-ci-template.yml file: gitlab-ci-template.yml
deploy:
image: registry.hottis.de/dockerized/docker-bash:latest
stage: deploy
tags:
- hottis
- linux
- docker
only:
- tags
variables:
GIT_STRATEGY: none
CONTAINER_NAME: sink
script:
- docker stop $CONTAINER_NAME || echo "container not running, never mind"
- docker rm $CONTAINER_NAME || echo "container not existing, never mind"
- docker run -d --network docker-server --ip 172.16.10.42 -v sink_config:/etc/sink --name $CONTAINER_NAME --restart always $IMAGE_NAME:$CI_COMMIT_TAG