From c349defdeb60eb3d8ae8bdf4e0e9f80cd971eff2 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Tue, 21 Sep 2021 16:06:58 +0200 Subject: [PATCH] deploy stage added --- .gitlab-ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 58ea1fd..1d424cd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,5 +1,27 @@ +stages: + - check + - build + - deploy + include: - project: dockerized/commons ref: master 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 +