check and dockerize stage added

This commit is contained in:
2021-01-19 10:53:35 +01:00
parent f0aafd45f1
commit 3f88cf0bf9
2 changed files with 37 additions and 6 deletions

View File

@ -1,10 +1,10 @@
stages:
- build
# - check
# - dockerize
- check
- dockerize
variables:
IMAGE_NAME: $CI_REGISTRY/$CI_PROJECT_PATH
IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH}
build:
image: node:14-buster
@ -13,8 +13,40 @@ build:
- hottis
- linux
- docker
artifacts:
paths:
- dist.tgz
expire_in: 1 day
script:
- cd hv-ui
- npm install
- ng build --prod
- ./node_modules/.bin/ng build --prod
- tar -czf ../dist.tgz dist
check:
image: registry.hottis.de/dockerized/base-build-env:latest
stage: check
tags:
- hottis
- linux
- docker
rules:
- if: ${CI_COMMIT_TAG}
script:
- checksemver.py -v
--versionToValidate "${CI_COMMIT_TAG}"
--validateMessage
--messageToValidate "${CI_COMMIT_MESSAGE}"
dockerize:
image: registry.hottis.de/dockerized/docker-bash:latest
stage: build
tags:
- hottis
- linux
- docker
script:
- docker build --tag ${IMAGE_NAME}:latest --tag ${IMAGE_NAME}:$CI_COMMIT_TAG} .
- docker login -u gitlab-ci-token -p ${CI_JOB_TOKEN} ${CI_REGISTRY}
- docker push ${IMAGE_NAME}:latest
- docker push ${IMAGE_NAME}:$CI_COMMIT_TAG}

View File

@ -5,7 +5,6 @@
"ng": "ng",
"start": "ng serve",
"build": "ng build",
"buildprod": "ng build --prod",
"test": "ng test",
"lint": "ng lint",
"e2e": "ng e2e"