include:
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'

stages:
- build
- deploy-prod

variables:
  DOCKER_HOST: tcp://docker:2376
  DOCKER_TLS_CERTDIR: "/certs"
  DOCKER_TLS_VERIFY: 1
  DOCKER_CERT_PATH: "$DOCKER_TLS_CERTDIR/client"
  DOCKER_DRIVER: overlay2

image: buildtool/build-tools:${BUILDTOOLS_VERSION}
services:
- docker:${DOCKER_DIND_VERSION}

build:
  stage: build
  script:
  - build
  - push

deploy-to-prod:
  stage: deploy-prod
  when: on_success
  script:
  - echo Deploy to PROD.
  - deploy prod
  environment:
    name: prod
  only:
  - master
