changes in ci

This commit is contained in:
Wolfgang Hottgenroth 2021-09-11 17:46:29 +02:00
parent 05823a1829
commit dbb9686312
Signed by: wn
GPG Key ID: E49AF3B9EF6DD469

View File

@ -2,6 +2,7 @@ stages:
- check
- build
- dockerize
- deploy
check:
@ -80,4 +81,36 @@ dockerize-ui:
docker push $IMAGE_NAME:${CI_COMMIT_TAG};
fi
.deploy:
image: registry.hottis.de/dockerized/docker-bash:latest
stage: deploy
tags:
- hottis
- linux
- docker
only:
- tags
variables:
GIT_STRATEGY: none
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 $CONTAINER_IP
--name $CONTAINER_NAME
--restart always
$IMAGE_NAME:$CI_COMMIT_TAG
deploy-api:
extends:
- .deploy
variables:
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}/api
CONTAINER_NAME: hv2-api
deploy-ui:
extends:
- .deploy
variables:
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}/ui
CONTAINER_NAME: hv2-ui