include:
  - template: Auto-DevOps.gitlab-ci.yml

variables:
  GITLAB_MIRROR_PREFIX: "${CI_REGISTRY}/gitlab"
  SECURE_ANALYZERS_PREFIX: "${GITLAB_MIRROR_PREFIX}/security-products"
  CLUSTER_INTEGRATION_PREFIX: "${GITLAB_MIRROR_PREFIX}/cluster-integration"
  CODE_QUALITY_PREFIX: "${GITLAB_MIRROR_PREFIX}/codequality"

image: "${ALPINE_IMAGE}"

build:
  image: "${CLUSTER_INTEGRATION_PREFIX}/auto-build-image:${AUTO_BUILD_IMAGE_VERSION}"
  services:
    - name: "${DIND_IMAGE}"
      command: ['--tls=false', '--host=tcp://0.0.0.0:2375']
      alias: docker

code_quality:
  image: "${DOCKER_IMAGE}"
  services:
    - name: "${DIND_IMAGE}"
      command: ['--tls=false', '--host=tcp://0.0.0.0:2375']
      alias: docker
  variables:
    CODE_QUALITY_IMAGE: "${CODE_QUALITY_PREFIX}/codequality:${CODE_QUALITY_IMAGE_TAG}"
    CODECLIMATE_REGISTRY_USERNAME: "codeclimate"
    CODECLIMATE_PREFIX: "${GITLAB_MIRROR_PREFIX}/"

container_scanning:
  image: "${SECURE_ANALYZERS_PREFIX}/container-scanning:${CONTAINER_SCANNING_IMAGE_VERSION}"
  variables:
    CS_TRIVY_JAVA_DB: "${GITLAB_MIRROR_PREFIX}/trivy-java-db"
    CONTAINER_SCANNING_IMAGE_VERSION: "6"

.auto-deploy:
  image: "${CLUSTER_INTEGRATION_PREFIX}/auto-deploy-image:${AUTO_DEPLOY_IMAGE_VERSION}"
