variables:
  HELPERS_FILE: docker-build.yml
  APP_HELM_NAME: cache
  DOCKER_FILE: deployment/ci/Dockerfile

stages:
  - compile
  - test
  - build
  - manifest
  - deploy

include:
  - project: '${HELPERS_PATH}'
    file: '${HELPERS_FILE}'
  - template: 'Workflows/Branch-Pipelines.gitlab-ci.yml'

lint:
  image: golangci/golangci-lint:v1.44.2
  stage: test
  tags:
    - amd64-docker
  script:
    - golangci-lint --version
    - golangci-lint run
  before_script:
    - ln -s /builds /go/src/gitlab.com
    - cd /go/src/gitlab.com/${CI_PROJECT_PATH}

unit tests:
  image: golang:1.17.7
  extends: .gotest
  stage: test
  tags:
    - amd64-docker
  before_script: []

amd64:
  extends: .docker-build
  stage: build
  tags:
    - amd64-docker

manifest:
  extends: .manifest-amd64
  stage: manifest

cloud:
  extends: .manifest-cloud
  stage: manifest

release:
  extends: .manifest-release
  stage: manifest