component:
  stage: test-integration
  variables:
    OPENTOFU_VERSION: $LATEST_OPENTOFU_VERSION
    TEST_TF_STATE_NAME: ci-integration-$CI_PIPELINE_IID-$CI_NODE_INDEX
    TEST_TF_ROOT: tests/iac
  trigger:
    include: tests/integration-tests/$PIPELINE_NAME.gitlab-ci.yml
    strategy: depend
  parallel:
    matrix:
      - PIPELINE_NAME: [Defaults]
      - PIPELINE_NAME: [JobTemplates]

backport-templates:
  stage: test-integration
  variables:
    GITLAB_OPENTOFU_IMAGE_REGISTRY_BASE: $GITLAB_OPENTOFU_IMAGE_BASE
    GITLAB_OPENTOFU_VERSION: $CI_COMMIT_SHA
    OPENTOFU_VERSION: $LATEST_OPENTOFU_VERSION
    TF_STATE_NAME: ci-integration-backports-$CI_PIPELINE_IID-$CI_NODE_INDEX
    TF_ROOT: tests/iac
  trigger:
    include: tests/integration-tests/$PIPELINE_NAME.gitlab-ci.yml
    strategy: depend
  parallel:
    matrix:
      - PIPELINE_NAME: [BackportTemplates]
