component:
  stage: test-integration
  variables:
    OPENTOFU_VERSION: $LATEST_OPENTOFU_VERSION
    TF_STATE_NAME: ci-integration-$CI_PIPELINE_IID-$CI_NODE_INDEX
    TF_ROOT: tests/terraform
  trigger:
    include: tests/integration-tests/$PIPELINE
    strategy: depend
  rules:
    - if: '$CI_PROJECT_PATH == "components/opentofu"'
      #- if: '$CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"'
  parallel:
    matrix:
      - PIPELINE: [Defaults.gitlab-ci.yml]

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/terraform
  trigger:
    include: tests/integration-tests/$PIPELINE
    strategy: depend
  rules:
    - if: '$CI_PROJECT_PATH == "components/opentofu"'
      #- if: '$CI_MERGE_REQUEST_EVENT_TYPE == "merge_train"'
  parallel:
    matrix:
      - PIPELINE: [BackportTemplates.gitlab-ci.yml]
