diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a1869f9..245be14 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -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 - \ No newline at end of file + - ./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} diff --git a/hv-ui/package.json b/hv-ui/package.json index 2255363..a3ae6e5 100644 --- a/hv-ui/package.json +++ b/hv-ui/package.json @@ -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"