Parallelize CI a bit

This commit is contained in:
Aarni Halinen
2019-12-18 16:53:35 +02:00
parent d0216bb85c
commit f2ffcaa5a9
+7 -8
View File
@@ -1,12 +1,11 @@
stages: stages:
- test - qa
- lint
- publish - publish
- deploy - deploy
test: test:
image: python:3.7 image: python:3.7
stage: test stage: qa
services: services:
- postgres:12 - postgres:12
variables: variables:
@@ -24,14 +23,14 @@ test:
pycodestyle: pycodestyle:
image: python:3.7 image: python:3.7
stage: lint stage: qa
script: script:
- pip install pycodestyle - pip install pycodestyle
- pycodestyle --config=setup.cfg --count . - pycodestyle --config=setup.cfg --count .
eslint: eslint:
image: node:alpine image: node:alpine
stage: lint stage: qa
before_script: before_script:
- npm install - npm install
script: script:
@@ -39,7 +38,7 @@ eslint:
remark: remark:
image: node:alpine image: node:alpine
stage: lint stage: qa
before_script: before_script:
- npm install - npm install
script: script:
@@ -59,7 +58,7 @@ publish:
- docker build . -t "$IMAGE_NAME" - docker build . -t "$IMAGE_NAME"
- docker push "$IMAGE_NAME" - docker push "$IMAGE_NAME"
deploy_dev: deploy:dev:
stage: deploy stage: deploy
image: alpine:latest image: alpine:latest
environment: environment:
@@ -82,7 +81,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 "docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY"
- ssh $DEV_SSH_USER@$DEV_SSH_HOST "bash ~/deployment/deploy_dev.sh \"$IMAGE_NAME\"" - ssh $DEV_SSH_USER@$DEV_SSH_HOST "bash ~/deployment/deploy_dev.sh \"$IMAGE_NAME\""
deploy_production: deploy:production:
stage: deploy stage: deploy
image: docker:stable image: docker:stable
only: only: