sprint/.gitlab-ci.yml
Egor Matveev 899785e1d3 gitlab
2021-11-05 22:05:19 +03:00

44 lines
566 B
YAML

stages:
- build
- deploy-dev
- deploy-prod
before_script:
- echo "Starting..."
after_script:
- echo "Done!"
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