Commit 25b12882 authored by Guilhem Martin's avatar Guilhem Martin Committed by Pierre Smeyers
Browse files

fix(tftest): change tftest jobs inheritance to support OIDC variants

parent 853ded3a
Loading
Loading
Loading
Loading
+6 −7
Original line number Diff line number Diff line
@@ -849,9 +849,6 @@ stages:
    # shellcheck disable=SC2154
    log_info "--- \\e[32mtest\\e[0m"

    # unset any upstream deployment env & artifacts
    rm -f terraform.env

    # maybe execute pre test script
    prescript="$TF_SCRIPTS_DIR/tf-pre-test.sh"
    if [[ -f "$prescript" ]]; then
@@ -862,8 +859,6 @@ stages:
    fi

    mkdir -p "$TF_PROJECT_DIR"/reports/
    tf_pre_init
    terraform init -backend=false

    # shellcheck disable=SC2046
    terraform test -junit-xml="reports/${ENV_TYPE}-tftest.xunit.xml" $(echo "$opts" | envsubst_cli)
@@ -1121,7 +1116,7 @@ stages:
      terraform: $TF_PROJECT_DIR/${ENV_TYPE}-plan.json

.tf-test:
  extends: .tf-base
  extends: .tf-workspace
  stage: test
  script:
    - !reference [ .tf-commands, test ]
@@ -1413,6 +1408,7 @@ tf-test-review:
  variables:
    ENV_TYPE: review
    ENV_TFTEST_OPTS: $TF_REVIEW_TFTEST_OPTS
    ENV_INIT_OPTS: $TF_REVIEW_INIT_OPTS
  extends: .tf-test
  resource_group: tf-review/$CI_COMMIT_REF_NAME
  rules:
@@ -1514,8 +1510,9 @@ tf-plan-integration:
# terraform test job for integration
tf-test-integration:
  variables:
    ENV_TYPE: integ
    ENV_TYPE: integration
    ENV_TFTEST_OPTS: $TF_INTEG_TFTEST_OPTS
    ENV_INIT_OPTS: $TF_INTEG_INIT_OPTS
  extends: .tf-test
  resource_group:  tf-integration
  rules:
@@ -1615,6 +1612,7 @@ tf-test-staging:
  variables:
    ENV_TYPE: staging
    ENV_TFTEST_OPTS: $TF_STAGING_TFTEST_OPTS
    ENV_INIT_OPTS: $TF_STAGING_INIT_OPTS
  extends: .tf-test
  resource_group: tf-staging
  rules:
@@ -1723,6 +1721,7 @@ tf-test-production:
  variables:
    ENV_TYPE: production
    ENV_TFTEST_OPTS: $TF_PROD_TFTEST_OPTS
    ENV_INIT_OPTS: $TF_PROD_INIT_OPTS
  extends: .tf-test
  resource_group: tf-production
  rules: