Loading templates/gitlab-ci-terraform.yml +13 −7 Original line number Diff line number Diff line Loading @@ -674,6 +674,17 @@ stages: return $? } tf_pre_init() { # maybe execute pre init script prescript="$TF_SCRIPTS_DIR/tf-pre-init.sh" if [[ -f "$prescript" ]]; then log_info "--- \\e[32mpre-init\\e[0m hook (\\e[33;1m${prescript}\\e[0m) found: execute" exec_hook "$prescript" else log_info "--- \\e[32mpre-init\\e[0m hook (\\e[33;1m${prescript}\\e[0m) not found: skip" fi } function tf_init() { opts=${ENV_INIT_OPTS:-$TF_INIT_OPTS} extra_opts=${ENV_EXTRA_OPTS:-$TF_EXTRA_OPTS} Loading Loading @@ -715,13 +726,7 @@ stages: terraform --version # maybe execute pre init script prescript="$TF_SCRIPTS_DIR/tf-pre-init.sh" if [[ -f "$prescript" ]]; then log_info "--- \\e[32mpre-init\\e[0m hook (\\e[33;1m${prescript}\\e[0m) found: execute" exec_hook "$prescript" else log_info "--- \\e[32mpre-init\\e[0m hook (\\e[33;1m${prescript}\\e[0m) not found: skip" fi tf_pre_init if [[ "$TF_GITLAB_BACKEND_DISABLED" != "true" ]] then Loading Loading @@ -1148,6 +1153,7 @@ tf-validate: stage: test needs: [] script: - tf_pre_init - terraform init -backend=false - terraform validate dependencies: [] Loading Loading
templates/gitlab-ci-terraform.yml +13 −7 Original line number Diff line number Diff line Loading @@ -674,6 +674,17 @@ stages: return $? } tf_pre_init() { # maybe execute pre init script prescript="$TF_SCRIPTS_DIR/tf-pre-init.sh" if [[ -f "$prescript" ]]; then log_info "--- \\e[32mpre-init\\e[0m hook (\\e[33;1m${prescript}\\e[0m) found: execute" exec_hook "$prescript" else log_info "--- \\e[32mpre-init\\e[0m hook (\\e[33;1m${prescript}\\e[0m) not found: skip" fi } function tf_init() { opts=${ENV_INIT_OPTS:-$TF_INIT_OPTS} extra_opts=${ENV_EXTRA_OPTS:-$TF_EXTRA_OPTS} Loading Loading @@ -715,13 +726,7 @@ stages: terraform --version # maybe execute pre init script prescript="$TF_SCRIPTS_DIR/tf-pre-init.sh" if [[ -f "$prescript" ]]; then log_info "--- \\e[32mpre-init\\e[0m hook (\\e[33;1m${prescript}\\e[0m) found: execute" exec_hook "$prescript" else log_info "--- \\e[32mpre-init\\e[0m hook (\\e[33;1m${prescript}\\e[0m) not found: skip" fi tf_pre_init if [[ "$TF_GITLAB_BACKEND_DISABLED" != "true" ]] then Loading Loading @@ -1148,6 +1153,7 @@ tf-validate: stage: test needs: [] script: - tf_pre_init - terraform init -backend=false - terraform validate dependencies: [] Loading