include:
  - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/gitlab-ci/extract@master
    inputs:
      extract-script-job-tags: ["docker"]
  - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/gitlab-ci/validation@master
    inputs:
      check-links-job-tags: ["docker"]
      tbc-check-job-tags: ["docker"]
  - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/kicker/validation@master
    inputs:
      kicker-validation-job-tags: ["docker"]
      schema-base-url: "https://git.code.tecnalia.com/api/v4/projects/smartdatalab%2Fpublic%2Fci-cd-components%2Fkicker/repository/files"
  - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/bash/gitlab-ci-bash@master
    inputs:
      bash-shellcheck-job-tags: ["docker"]
  - component: git.code.tecnalia.com/smartdatalab/public/ci-cd-components/semantic-release/gitlab-ci-semrel@master

stages:
  - build
  - publish

variables:
  GITLAB_CI_FILES: "templates/gitlab-ci-docker.yml"
  BASH_SHELLCHECK_FILES: "*.sh"

semantic-release:
  rules:
    # on production branch(es): auto if SEMREL_AUTO_RELEASE_ENABLED
    - if: '$TMPL_RELEASE_ENABLED == "true" && $CI_COMMIT_REF_NAME =~ $PROD_REF'