From bbe7921d193af21c2fc1415864a695a3a73e9947 Mon Sep 17 00:00:00 2001 From: Timo Furrer <tfurrer@gitlab.com> Date: Fri, 26 Jan 2024 10:14:33 +0100 Subject: [PATCH] Full pipeline does unconditionally include destructive jobs --- README.md | 2 -- templates/full-pipeline.yml | 16 ---------------- tests/integration-tests/Defaults.gitlab-ci.yml | 2 -- 3 files changed, 20 deletions(-) diff --git a/README.md b/README.md index 059f8ec..5b174b4 100644 --- a/README.md +++ b/README.md @@ -123,8 +123,6 @@ Have a look at the individual template spec to learn about the available inputs. | `state_name` | `default` | Remote OpenTofu state name. | | `auto_apply` | `false` | Whether the apply job is manual or automatically run. | | `auto_destroy` | `false` | Whether the destroy job is manual or automatically run. | -| `create_destroy_job` | `false` | Wheather the destroy job should be created or not. | -| `create_delete_state_job` | `false` | Wheather the delete-state job should be created or not. | ### Available OpenTofu Versions diff --git a/templates/full-pipeline.yml b/templates/full-pipeline.yml index 15835df..86323f2 100644 --- a/templates/full-pipeline.yml +++ b/templates/full-pipeline.yml @@ -54,14 +54,6 @@ spec: auto_destroy: default: 'false' description: 'Whether the destroy job is manual or automatically run.' - create_destroy_job: - default: false - type: boolean - description: 'Wheather the destroy job should be created or not.' - create_delete_state_job: - default: false - type: boolean - description: 'Wheather the delete-state job should be created or not.' --- @@ -112,19 +104,11 @@ include: root_dir: $[[ inputs.root_dir ]] state_name: $[[ inputs.state_name ]] auto_destroy: $[[ inputs.auto_apply ]] - rules: - - if: '"$[[ inputs.create_destroy_job ]]" == "true"' - when: always - - when: never - local: '/templates/delete-state.yml' inputs: as: 'delete-state' stage: $[[ inputs.stage_cleanup ]] state_name: $[[ inputs.state_name ]] - rules: - - if: '"$[[ inputs.create_delete_state_job ]]" == "true"' - when: always - - when: never # NOTE: we have to define this `needs` here, because inputs don't support arrays, yet. delete-state: diff --git a/tests/integration-tests/Defaults.gitlab-ci.yml b/tests/integration-tests/Defaults.gitlab-ci.yml index bff4e50..4e856f3 100644 --- a/tests/integration-tests/Defaults.gitlab-ci.yml +++ b/tests/integration-tests/Defaults.gitlab-ci.yml @@ -6,8 +6,6 @@ include: opentofu_version: $OPENTOFU_VERSION root_dir: $TEST_TF_ROOT state_name: $TEST_TF_STATE_NAME - create_destroy_job: true - create_delete_state_job: true stages: [validate, test, build, deploy, cleanup] -- GitLab