fix in ci script

This commit is contained in:
Wolfgang Hottgenroth 2021-08-02 17:43:11 +02:00
parent e1eef2da2c
commit 7f6f67eb60

View File

@ -2,7 +2,7 @@ stages:
- check
- generate
- build
- deploy
- dockerize
variables:
IMAGE_BASE: $CI_REGISTRY/$CI_PROJECT_PATH
@ -33,15 +33,15 @@ generate:
script:
- ./generate.sh
build-api:
dockerize-api:
image: registry.hottis.de/dockerized/docker-bash:latest
stage: build
stage: dockerize
tags:
- hottis
- linux
- docker
variables:
IMAGE_NAME: ${IMAGE_BASE}/api
IMAGE_NAME: $IMAGE_BASE/api
script:
- cd api
- docker build --tag $IMAGE_NAME:latest .
@ -60,8 +60,10 @@ build-ui:
- hottis
- linux
- docker
variables:
IMAGE_NAME: ${IMAGE_BASE}/api
artifacts:
paths:
- dist.tgz
expire_in: 1 day
script:
- cd ui/hv2-ui
- if [ "$CI_COMMIT_TAG" != "" ]; then
@ -69,8 +71,19 @@ build-ui:
fi
- npm install
- ./node_modules/.bin/ng build --prod
- mv dist ..
- cd ..
- tar -czf ../dist.tgz dist
dockerize-ui:
image: registry.hottis.de/dockerized/docker-bash:latest
stage: dockerize
tags:
- hottis
- linux
- docker
variables:
IMAGE_NAME: $IMAGE_BASE/ui
script:
- tar -xzf dist.tgz
- docker build --tag $IMAGE_NAME:latest .
- if [ "$CI_COMMIT_TAG" != "" ]; then
docker tag $IMAGE_NAME:latest $IMAGE_NAME:${CI_COMMIT_TAG};