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=stag.felicity.com TRAEFIK_TAG=stag.felicity.com STACK_NAME=stag-felicity-com TAG=stag sh ./scripts/deploy.sh environment: name: staging url: https://stag.felicity.com only: - master tags: - swarm - stag deploy-prod: stage: deploy script: - > DOMAIN=felicity.com TRAEFIK_TAG=felicity.com STACK_NAME=felicity-com TAG=prod sh ./scripts/deploy.sh environment: name: production url: https://felicity.com only: - production tags: - swarm - prod