Streamline CI
This commit is contained in:
+9
-10
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user