2021-08-06 01:28:10 +02:00
|
|
|
#include:
|
|
|
|
# - local: 'ci_templates/.cic-template.yml'
|
|
|
|
# - local: 'apps/contract-migration/.gitlab-ci.yml'
|
|
|
|
# - local: 'apps/cic-eth/.gitlab-ci.yml'
|
|
|
|
# - local: 'apps/cic-ussd/.gitlab-ci.yml'
|
|
|
|
# - local: 'apps/cic-notify/.gitlab-ci.yml'
|
|
|
|
# - local: 'apps/cic-meta/.gitlab-ci.yml'
|
|
|
|
# - local: 'apps/cic-cache/.gitlab-ci.yml'
|
|
|
|
# - local: 'apps/data-seeding/.gitlab-ci.yml'
|
|
|
|
|
|
|
|
image: tiangolo/docker-with-compose
|
|
|
|
|
|
|
|
before_script:
|
|
|
|
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
|
2021-08-13 21:45:27 +02:00
|
|
|
- pip install docker-auto-labels
|
2021-01-24 21:16:22 +01:00
|
|
|
|
|
|
|
stages:
|
2021-08-13 21:45:27 +02:00
|
|
|
- test
|
2021-01-24 21:16:22 +01:00
|
|
|
- build
|
2021-08-06 01:28:10 +02:00
|
|
|
- deploy
|
|
|
|
|
2021-08-06 01:59:16 +02:00
|
|
|
variables:
|
|
|
|
DOCKER_BUILDKIT: 1
|
|
|
|
COMPOSE_DOCKER_CLI_BUILD: 1
|
|
|
|
|
2021-08-13 21:45:27 +02:00
|
|
|
build-staging:
|
2021-08-06 01:39:48 +02:00
|
|
|
tags:
|
|
|
|
- integration
|
2021-08-06 01:28:10 +02:00
|
|
|
stage: build
|
|
|
|
script:
|
2021-08-13 21:45:27 +02:00
|
|
|
- TAG=stag FRONTEND_ENV=staging sh ./scripts/build-push.sh
|
2021-08-06 01:28:10 +02:00
|
|
|
only:
|
|
|
|
- bvander/integration-tests-on-docker
|
|
|
|
|
2021-08-13 21:45:27 +02:00
|
|
|
deploy-staging:
|
2021-08-06 01:39:48 +02:00
|
|
|
tags:
|
|
|
|
- integration
|
2021-08-06 01:28:10 +02:00
|
|
|
stage: deploy
|
2021-08-13 21:45:27 +02:00
|
|
|
script:
|
|
|
|
- >
|
|
|
|
DOMAIN=stag.grassrootseconomics.net
|
|
|
|
TRAEFIK_TAG=grassrootseconomics.net
|
|
|
|
STACK_NAME=stag-cic-net
|
|
|
|
TAG=stag
|
|
|
|
sh ./scripts/deploy.sh
|
|
|
|
environment:
|
|
|
|
name: staging
|
|
|
|
url: https://stag.grassrootseconomics.net
|
2021-08-06 01:28:10 +02:00
|
|
|
only:
|
|
|
|
- bvander/integration-tests-on-docker
|
|
|
|
|
2021-08-13 21:45:27 +02:00
|
|
|
|
|
|
|
#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=stag.demo1.com
|
|
|
|
# TRAEFIK_TAG=stag.demo1.com
|
|
|
|
# STACK_NAME=stag-demo1-com
|
|
|
|
# TAG=stag
|
|
|
|
# sh ./scripts/deploy.sh
|
|
|
|
# environment:
|
|
|
|
# name: staging
|
|
|
|
# url: https://stag.demo1.com
|
|
|
|
# only:
|
|
|
|
# - master
|
|
|
|
# tags:
|
|
|
|
# - swarm
|
|
|
|
# - stag
|
|
|
|
#
|
|
|
|
#deploy-prod:
|
|
|
|
# stage: deploy
|
|
|
|
# script:
|
|
|
|
# - >
|
|
|
|
# DOMAIN=demo1.com
|
|
|
|
# TRAEFIK_TAG=demo1.com
|
|
|
|
# STACK_NAME=demo1-com
|
|
|
|
# TAG=prod
|
|
|
|
# sh ./scripts/deploy.sh
|
|
|
|
# environment:
|
|
|
|
# name: production
|
|
|
|
# url: https://demo1.com
|
|
|
|
# only:
|
|
|
|
# - production
|
|
|
|
# tags:
|
|
|
|
# - swarm
|
|
|
|
# - prod
|