Skip to content
Snippets Groups Projects
Commit 39a27927 authored by Timo Furrer's avatar Timo Furrer
Browse files

Merge branch 'full-pipeline-with-unconditional-destruction' into 'main'

Full pipeline does unconditionally include destructive jobs

See merge request components/opentofu!20
parents 7479ca42 bbe7921d
Branches
Tags
No related merge requests found
...@@ -123,8 +123,6 @@ Have a look at the individual template spec to learn about the available inputs. ...@@ -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. | | `state_name` | `default` | Remote OpenTofu state name. |
| `auto_apply` | `false` | Whether the apply job is manual or automatically run. | | `auto_apply` | `false` | Whether the apply job is manual or automatically run. |
| `auto_destroy` | `false` | Whether the destroy 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 ### Available OpenTofu Versions
......
...@@ -54,14 +54,6 @@ spec: ...@@ -54,14 +54,6 @@ spec:
auto_destroy: auto_destroy:
default: 'false' default: 'false'
description: 'Whether the destroy job is manual or automatically run.' 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: ...@@ -112,19 +104,11 @@ include:
root_dir: $[[ inputs.root_dir ]] root_dir: $[[ inputs.root_dir ]]
state_name: $[[ inputs.state_name ]] state_name: $[[ inputs.state_name ]]
auto_destroy: $[[ inputs.auto_apply ]] auto_destroy: $[[ inputs.auto_apply ]]
rules:
- if: '"$[[ inputs.create_destroy_job ]]" == "true"'
when: always
- when: never
- local: '/templates/delete-state.yml' - local: '/templates/delete-state.yml'
inputs: inputs:
as: 'delete-state' as: 'delete-state'
stage: $[[ inputs.stage_cleanup ]] stage: $[[ inputs.stage_cleanup ]]
state_name: $[[ inputs.state_name ]] 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. # NOTE: we have to define this `needs` here, because inputs don't support arrays, yet.
delete-state: delete-state:
......
...@@ -6,8 +6,6 @@ include: ...@@ -6,8 +6,6 @@ include:
opentofu_version: $OPENTOFU_VERSION opentofu_version: $OPENTOFU_VERSION
root_dir: $TEST_TF_ROOT root_dir: $TEST_TF_ROOT
state_name: $TEST_TF_STATE_NAME state_name: $TEST_TF_STATE_NAME
create_destroy_job: true
create_delete_state_job: true
stages: [validate, test, build, deploy, cleanup] stages: [validate, test, build, deploy, cleanup]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment