🎉 First commit, from couchbase generator, basic changes
not tested / updated yet
This commit is contained in:
74
{{cookiecutter.project_slug}}/.gitlab-ci.yml
Normal file
74
{{cookiecutter.project_slug}}/.gitlab-ci.yml
Normal file
@@ -0,0 +1,74 @@
|
||||
image: tiangolo/docker-with-compose
|
||||
|
||||
before_script:
|
||||
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
||||
- pip install docker-auto-labels
|
||||
|
||||
stages:
|
||||
- test
|
||||
- build
|
||||
- deploy
|
||||
|
||||
tests:
|
||||
stage: test
|
||||
script:
|
||||
- sh ./scripts/test.sh
|
||||
tags:
|
||||
- build
|
||||
- test
|
||||
|
||||
build-stag:
|
||||
stage: build
|
||||
script:
|
||||
- TAG=stag FRONTEND_ENV=staging sh ./scripts/build-push.sh
|
||||
only:
|
||||
- master
|
||||
tags:
|
||||
- build
|
||||
- test
|
||||
|
||||
build-prod:
|
||||
stage: build
|
||||
script:
|
||||
- TAG=prod FRONTEND_ENV=production sh ./scripts/build-push.sh
|
||||
only:
|
||||
- production
|
||||
tags:
|
||||
- build
|
||||
- test
|
||||
|
||||
deploy-stag:
|
||||
stage: deploy
|
||||
script:
|
||||
- >
|
||||
DOMAIN={{cookiecutter.domain_staging}}
|
||||
TRAEFIK_TAG={{cookiecutter.traefik_constraint_tag_staging}}
|
||||
STACK_NAME={{cookiecutter.docker_swarm_stack_name_staging}}
|
||||
TAG=stag
|
||||
sh ./scripts/deploy.sh
|
||||
environment:
|
||||
name: staging
|
||||
url: https://{{cookiecutter.domain_staging}}
|
||||
only:
|
||||
- master
|
||||
tags:
|
||||
- swarm
|
||||
- stag
|
||||
|
||||
deploy-prod:
|
||||
stage: deploy
|
||||
script:
|
||||
- >
|
||||
DOMAIN={{cookiecutter.domain_main}}
|
||||
TRAEFIK_TAG={{cookiecutter.traefik_constraint_tag}}
|
||||
STACK_NAME={{cookiecutter.docker_swarm_stack_name_main}}
|
||||
TAG=prod
|
||||
sh ./scripts/deploy.sh
|
||||
environment:
|
||||
name: production
|
||||
url: https://{{cookiecutter.domain_main}}
|
||||
only:
|
||||
- production
|
||||
tags:
|
||||
- swarm
|
||||
- prod
|
Reference in New Issue
Block a user