From af01804a7fab36827188fa67712ed3fa5aa7bfc3 Mon Sep 17 00:00:00 2001 From: Aarni Halinen Date: Wed, 18 Dec 2019 16:49:38 +0200 Subject: [PATCH] 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: