Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Opentofu
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DBS
gitlab-component
Opentofu
Commits
6ac698fd
Unverified
Commit
6ac698fd
authored
4 months ago
by
Timo Furrer
Browse files
Options
Downloads
Patches
Plain Diff
Refactor plan job for non-empty plan behavior
parent
9336f64b
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
templates/plan.yml
+8
-5
8 additions, 5 deletions
templates/plan.yml
with
8 additions
and
5 deletions
templates/plan.yml
+
8
−
5
View file @
6ac698fd
...
@@ -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
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment