sprint/.gitlab-ci.yml
2021-11-06 13:10:52 +03:00

50 lines
683 B
YAML

stages:
- lint
- build
- deploy-dev
- deploy-prod
variables:
SOLUTIONS_ROOT_EXTERNAL: "/sprint-data/data/solutions"
DB_HOST: "postgres"
lint:
stage: lint
tags:
- main
script:
- mypy --ignore-missing-imports .
build:
stage: build
tags:
- main
script:
- docker build -t sprint .
deploy-dev:
stage: deploy-dev
tags:
- main
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: on_success
- when: manual
variables:
PORT: 80
script:
- docker-compose up -d
deploy-prod:
stage: deploy-prod
tags:
- prod
only:
- master
when: manual
variables:
PORT: 443
script:
- docker-compose up -d