From af01804a7fab36827188fa67712ed3fa5aa7bfc3 Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Wed, 18 Dec 2019 16:49:38 +0200 Subject: [PATCH 1/2] Streamline CI --- .gitlab-ci.yml | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ae4e2f7..e27784f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,7 +1,6 @@ stages: - setup - - lint - - build + - qa - test - publish - deploy @@ -19,19 +18,19 @@ setup: es:lint: image: node:12 - stage: lint + stage: qa script: - npm run lint:es sass:lint: image: node:12 - stage: lint + stage: qa script: - npm run lint:sass -ts:build: +build: image: node:12 - stage: build + stage: qa script: - API_URL=http://web.sik.party:8000/api npm run build @@ -49,7 +48,7 @@ test:e2e: script: - API_URL=http://web.sik.party:8000/api npm run test:e2e -publish: +publish:dev: stage: publish image: docker:stable services: @@ -62,7 +61,7 @@ publish: - docker build . -t "$IMAGE_NAME":latest - docker push "$IMAGE_NAME":latest -publish_prod: +publish:prod: stage: publish image: docker:stable services: @@ -75,7 +74,7 @@ publish_prod: - docker build . -f Dockerfile.prod -t "$IMAGE_NAME":prod - docker push "$IMAGE_NAME":prod -deploy_dev: +deploy:dev: stage: deploy image: alpine:latest environment: @@ -97,7 +96,7 @@ deploy_dev: - ssh $DEV_SSH_USER@$DEV_SSH_HOST "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY" - ssh $DEV_SSH_USER@$DEV_SSH_HOST "bash ~/deployment-frontend/deploy_dev.sh \"$IMAGE_NAME:latest\"" -deploy_production: +deploy:prod: stage: deploy image: docker:stable only: From 47239498cfdb31366757d6ce70f0a71e12c34f16 Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Wed, 18 Dec 2019 17:18:14 +0200 Subject: [PATCH 2/2] Fix typo --- Dockerfile.prod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.prod b/Dockerfile.prod index f2a9016..300d8d3 100644 --- a/Dockerfile.prod +++ b/Dockerfile.prod @@ -7,7 +7,7 @@ RUN npm ci --only-prod COPY . ./ ENV API_URL https://sika.sik.party/api -CMD npm run build +RUN npm run build FROM fnichol/uhttpd AS server EXPOSE 3000