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

Replace inputs with variables

parent a4389a4d
Branches
Tags
No related merge requests found
...@@ -46,6 +46,12 @@ spec: ...@@ -46,6 +46,12 @@ spec:
state_name: state_name:
default: default default: default
description: 'State name' description: 'State name'
auto_apply:
default: 'false'
description: 'Whether the apply job is manual or automatically run'
auto_destroy:
default: 'false'
description: 'Whether the destroy job is manual or automatically run'
--- ---
...@@ -120,7 +126,7 @@ apply: ...@@ -120,7 +126,7 @@ apply:
action: start action: start
resource_group: $[[ inputs.state_name ]] resource_group: $[[ inputs.state_name ]]
rules: rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $TF_AUTO_DEPLOY == "true" - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $[[ inputs.auto_apply ]] == "true"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
when: manual when: manual
...@@ -133,7 +139,9 @@ destroy: ...@@ -133,7 +139,9 @@ destroy:
name: $[[ inputs.state_name ]] name: $[[ inputs.state_name ]]
action: stop action: stop
resource_group: $[[ inputs.state_name ]] resource_group: $[[ inputs.state_name ]]
when: manual rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $[[ inputs.auto_destroy ]] == "true"
- when: manual
delete-state: delete-state:
extends: .default extends: .default
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment