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

Refactor plan job for non-empty plan behavior

parent 9336f64b
No related branches found
No related tags found
No related merge requests found
...@@ -110,7 +110,15 @@ spec: ...@@ -110,7 +110,15 @@ spec:
extends: null extends: null
'.$[[ inputs.as ]]:detailed_exitcode:warning:true': '.$[[ inputs.as ]]:detailed_exitcode:warning:true':
variables:
OPENTOFU_COMPONENT_USE_DETAILED_EXITCODE: '$[[ inputs.warning_on_non_empty_plan ]]'
# NOTE: we rely on correct exitcode reporting behavior for the `warning_on_non_empty_plan` input
# behavior. However, when using bash the runner does not work properly without setting
# the feature flag below to `true`.
FF_USE_NEW_BASH_EVAL_STRATEGY: 'true'
allow_failure: allow_failure:
# NOTE: tofu plan -detailed-exitcode return 2 as exit code
# when the plan is non-empty.
exit_codes: [2] exit_codes: [2]
'$[[ inputs.as ]]': '$[[ inputs.as ]]':
...@@ -145,11 +153,6 @@ spec: ...@@ -145,11 +153,6 @@ spec:
TF_STATE_NAME: $[[ inputs.state_name ]] TF_STATE_NAME: $[[ inputs.state_name ]]
TF_PLAN_NAME: $[[ inputs.plan_name ]] TF_PLAN_NAME: $[[ inputs.plan_name ]]
OPENTOFU_COMPONENT_VAR_FILE: '$[[ inputs.var_file ]]' OPENTOFU_COMPONENT_VAR_FILE: '$[[ inputs.var_file ]]'
OPENTOFU_COMPONENT_USE_DETAILED_EXITCODE: '$[[ inputs.warning_on_non_empty_plan ]]'
# NOTE: we rely on correct exitcode reporting behavior for the `warning_on_non_empty_plan` input
# behavior. However, when using bash the runner does not work properly without setting
# the feature flag below to `true`.
FF_USE_NEW_BASH_EVAL_STRATEGY: 'true'
image: image:
name: '$[[ inputs.image_registry_base ]]/$[[ inputs.image_name ]]:$[[ inputs.version ]]-opentofu$[[ inputs.opentofu_version ]]-$[[ inputs.base_os ]]$[[ inputs.image_digest ]]' name: '$[[ inputs.image_registry_base ]]/$[[ inputs.image_name ]]:$[[ inputs.version ]]-opentofu$[[ inputs.opentofu_version ]]-$[[ inputs.base_os ]]$[[ inputs.image_digest ]]'
script: script:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment