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

Rename `warning_on_none_empty_plan` to `warning_on_non_empty_plan`

Changelog: changed
parent ac620cfa
Branches
Tags
No related merge requests found
......@@ -149,7 +149,7 @@ spec:
- when: manual
type: array
description: 'Defines the `rules` of the `delete-state` job.'
warning_on_none_empty_plan:
warning_on_non_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
......@@ -218,7 +218,7 @@ include:
artifacts_access: $[[ inputs.plan_artifacts_access ]]
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]]
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
warning_on_non_empty_plan: $[[ inputs.warning_on_non_empty_plan ]]
- local: '/templates/apply.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]apply'
......
......@@ -95,7 +95,7 @@ spec:
default: ''
type: string
description: 'Path to a variables files relative to root_dir.'
warning_on_none_empty_plan:
warning_on_non_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
......@@ -165,7 +165,7 @@ include:
state_name: $[[ inputs.state_name ]]
plan_name: $[[ inputs.plan_name ]]
var_file: $[[ inputs.var_file ]]
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
warning_on_non_empty_plan: $[[ inputs.warning_on_non_empty_plan ]]
- local: '/templates/apply.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]apply'
......
......@@ -93,7 +93,7 @@ spec:
default: pull-push
type: string
description: 'Defines the cache policy of the job.'
warning_on_none_empty_plan:
warning_on_non_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
......@@ -101,7 +101,7 @@ spec:
---
# NOTE: the two following jobs are necessary to implement the abstraction logic
# required for the `warning_on_none_empty_plan` input.
# required for the `warning_on_non_empty_plan` input.
# Without any kind of flow control support for the GitLab CI YAML we cannot infer
# another value from the input. However, we can clearly apply "inheritance" to
# customize behavior related to the CI keywords that have otherwise nothing
......@@ -116,8 +116,8 @@ spec:
'$[[ inputs.as ]]':
stage: $[[ inputs.stage ]]
extends:
# NOTE: see the comment above. This is to support the `warning_on_none_empty_plan` input.
- '.$[[ inputs.as ]]:detailed_exitcode:warning:$[[ inputs.warning_on_none_empty_plan ]]'
# NOTE: see the comment above. This is to support the `warning_on_non_empty_plan` input.
- '.$[[ inputs.as ]]:detailed_exitcode:warning:$[[ inputs.warning_on_non_empty_plan ]]'
environment:
name: $[[ inputs.state_name ]]
action: prepare
......@@ -145,8 +145,8 @@ spec:
TF_STATE_NAME: $[[ inputs.state_name ]]
TF_PLAN_NAME: $[[ inputs.plan_name ]]
OPENTOFU_COMPONENT_VAR_FILE: '$[[ inputs.var_file ]]'
OPENTOFU_COMPONENT_USE_DETAILED_EXITCODE: '$[[ inputs.warning_on_none_empty_plan ]]'
# NOTE: we rely on correct exitcode reporting behavior for the `warning_on_none_empty_plan` input
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'
......
......@@ -119,7 +119,7 @@ spec:
when: manual
type: array
description: 'Defines the `rules` of the `apply` job.'
warning_on_none_empty_plan:
warning_on_non_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
......@@ -172,7 +172,7 @@ include:
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]]
cache_policy: pull
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
warning_on_non_empty_plan: $[[ inputs.warning_on_non_empty_plan ]]
- local: '/templates/apply.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]apply'
......
......@@ -124,7 +124,7 @@ spec:
- when: manual
type: array
description: 'Defines the `rules` of the `delete-state` job.'
warning_on_none_empty_plan:
warning_on_non_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
......@@ -178,7 +178,7 @@ include:
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]]
cache_policy: pull
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
warning_on_non_empty_plan: $[[ inputs.warning_on_non_empty_plan ]]
- local: '/templates/destroy.yml'
inputs:
as: '$[[ inputs.job_name_prefix ]]destroy'
......
......@@ -105,7 +105,7 @@ spec:
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array
description: 'Defines the `rules` of the `plan` job.'
warning_on_none_empty_plan:
warning_on_non_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
......@@ -158,4 +158,4 @@ include:
var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]]
cache_policy: pull
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
warning_on_non_empty_plan: $[[ inputs.warning_on_non_empty_plan ]]
......@@ -7,7 +7,7 @@ include:
opentofu_version: $OPENTOFU_VERSION
root_dir: $TEST_TF_ROOT
state_name: $TEST_TF_STATE_NAME
warning_on_none_empty_plan: true
warning_on_non_empty_plan: true
# For CI Terraform state cleanup
- component: $CI_SERVER_FQDN/$CI_PROJECT_PATH/delete-state@$CI_COMMIT_SHA
......
......@@ -16,7 +16,7 @@ component:
- ModuleRelease
- Destroy
- VarFile
- WarningOnNoneEmptyPlan
- WarningOnNonEmptyPlan
GITLAB_OPENTOFU_BASE_IMAGE_OS:
- alpine
- debian
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment