image: registry.gitlab.fpcomplete.com/fpco/default-build-image:4116

cache:
  key: "$CI_BUILD_NAME"
  paths:
    - .stack-work/
    - .stack-root/

stages:
  - build

variables:
    STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"

build:
  stage: build
  only:
    - master
    - stable
  script: &build
    - export PATH=$HOME/.local/bin:$PATH
    - stack etc/scripts/release.hs check

manual_build:
  stage: build
  when: manual
  script: *build

docker_image_lts-11:
  stage: build
  when: manual
  script:
    - docker login -u "$PROD_DOCKER_USERNAME" -p "$PROD_DOCKER_PASSWORD"
    - etc/dockerfiles/stack-build/build.sh --push lts-11

docker_image_lts-12:
  stage: build
  when: manual
  script:
    - docker login -u "$PROD_DOCKER_USERNAME" -p "$PROD_DOCKER_PASSWORD"
    - etc/dockerfiles/stack-build/build.sh --push lts-12

image: registry.gitlab.fpcomplete.com/fpco/default-build-image:4297

cache:
  key: "$CI_BUILD_NAME"
  paths:
    - .stack-work/
    - .stack-root/

stages:
  - build

variables:
    STACK_ROOT: "${CI_PROJECT_DIR}/.stack-root"

build:
  stage: build
  only:
    - master
    - stable
  script: &build
    - export PATH=$HOME/.local/bin:$PATH
    - stack etc/scripts/release.hs check

manual_build:
  stage: build
  when: manual
  script: *build

docker_image_lts-11:
  stage: build
  when: manual
  script:
    - docker login -u "$PROD_DOCKER_USERNAME" -p "$PROD_DOCKER_PASSWORD"
    - etc/dockerfiles/stack-build/build.sh --push lts-11

docker_image_lts-12:
  stage: build
  when: manual
  script:
    - docker login -u "$PROD_DOCKER_USERNAME" -p "$PROD_DOCKER_PASSWORD"
    - etc/dockerfiles/stack-build/build.sh --push lts-12

Use Gitlab build image that has Mercurial
Use Gitlab build image that has Mercurial

CC @borsboom
