This commit is contained in:
Administrator
2023-09-23 16:13:11 +03:00
commit 9e7fc7b4c1
605 changed files with 78660 additions and 0 deletions

46
.gitlab-ci.yml Normal file
View File

@@ -0,0 +1,46 @@
stages:
- build
- deploy-dev
- deploy-prod
.deploy:
before_script:
- docker login -u mathwave -p $DOCKERHUB_PASSWORD
build:
stage: build
tags:
- dev
extends:
- .deploy
script:
- docker build -t mathwave/sprint-repo:platform .
- docker build -t mathwave/sprint-repo:platform-nginx nginx
- docker push mathwave/sprint-repo:platform
- docker push mathwave/sprint-repo:platform-nginx
deploy-dev:
extends:
- .deploy
stage: deploy-dev
tags:
- dev
rules:
- if: '$CI_COMMIT_BRANCH == "master"'
when: on_success
- if: '$CI_PIPELINE_SOURCE != "merge_request_event"'
when: manual
script:
- docker stack deploy --with-registry-auth -c ./.deploy/deploy-dev.yaml platform
deploy-prod:
extends:
- .deploy
stage: deploy-prod
tags:
- prod
only:
- master
when: manual
script:
- docker stack deploy --with-registry-auth -c ./.deploy/deploy-prod.yaml platform