# included templates
include:
  # {{ template.name }} template
  - project: "{{ template.project.path }}"
    ref: "{{ template.project.getLatestVersion(options.versionMode) }}"
    file: "{{ template.template_path }}"
  # {{ template.name }} template ({{ variant.name }} variant)
  - project: "{{ variant.project.path }}"
    ref: "{{ variant.project.getLatestVersion(options.versionMode) }}"
    file: "{{ variant.template_path }}"
  - remote: "https://{{ serverHost }}/{{ template.project.path }}/-/raw/{{ template.project.getLatestVersion(options.versionMode) }}/{{ template.template_path }}"
  # {{ template.name }} template ({{ variant.name }} variant)
  - remote: "https://{{ serverHost }}/{{ variant.project.path }}/-/raw/{{ variant.project.getLatestVersion(options.versionMode) }}/{{ variant.template_path }}"
  - component: "$CI_SERVER_FQDN/{{ template.project.path }}/{{ template.templateFile }}@{{ template.project.getLatestVersion(options.versionMode) }}"
    inputs:
      {{ template.getInputName(variable.name) }}: {{ variable.inputValue }}
      {{ template.getInputName(feature.disable_with) }}: true
      {{ template.getInputName(feature.enable_with) }}: true
      {{ template.getInputName(variable.name) }}: {{ variable.inputValue }}
  # {{ template.name }} template ({{ variant.name }} variant)
  - component: "{{ serverHost }}/{{ variant.project.path }}/{{ variant.templateFile }}@{{ variant.project.getLatestVersion(options.versionMode) }}"
    inputs:
      {{ template.getInputName(variable.name) }}: {{ variable.inputValue }}
      {{ template.getInputName(feature.disable_with) }}: true
      {{ template.getInputName(feature.enable_with) }}: true
      {{ template.getInputName(variable.name) }}: {{ variable.inputValue }}

# secret variables
# (define the variables below in your GitLab group/project variables)
# {{ secret.name }}: {{ secret.description }}
# {{ secret.name }}: {{ secret.description }}

# variables
variables:
  {{ variable.name }}: "{{ variable.value }}"
  {{ feature.disable_with }}: "true"
  {{ feature.enable_with }}: "true"
  {{ variable.name }}: "{{ variable.value }}"

# your pipeline stages
stages:
  - build
  - test
  - package-build
  - package-test
  - infra
  - deploy
  - acceptance
  - publish
  - infra-prod
  - production