stages: - build - check - dockerize variables: IMAGE_NAME: ${CI_REGISTRY}/${CI_PROJECT_PATH} build: image: node:14-buster stage: build tags: - hottis - linux - docker artifacts: paths: - dist.tgz expire_in: 1 day script: - cd hv-ui - npm install - ./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}