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

Support `warning_on_none_empty_plan` input in pipeline templates

Changelog: added
parent 4065954e
No related branches found
No related tags found
No related merge requests found
...@@ -155,6 +155,10 @@ spec: ...@@ -155,6 +155,10 @@ spec:
- when: manual - when: manual
type: array type: array
description: 'Defines the `rules` of the `delete-state` job.' description: 'Defines the `rules` of the `delete-state` job.'
warning_on_none_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
--- ---
...@@ -220,6 +224,7 @@ include: ...@@ -220,6 +224,7 @@ include:
artifacts_access: $[[ inputs.plan_artifacts_access ]] artifacts_access: $[[ inputs.plan_artifacts_access ]]
var_file: $[[ inputs.var_file ]] var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]] rules: $[[ inputs.plan_rules ]]
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
- local: '/templates/apply.yml' - local: '/templates/apply.yml'
inputs: inputs:
as: '$[[ inputs.job_name_prefix ]]apply' as: '$[[ inputs.job_name_prefix ]]apply'
...@@ -262,5 +267,5 @@ include: ...@@ -262,5 +267,5 @@ include:
# job template, but the issue is that we cannot default it to something # job template, but the issue is that we cannot default it to something
# meaningful other than `null` - but `null` is also not yet supported, see # meaningful other than `null` - but `null` is also not yet supported, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468 # https://gitlab.com/gitlab-org/gitlab/-/issues/440468
$[[ inputs.job_name_prefix ]]delete-state: '$[[ inputs.job_name_prefix ]]delete-state':
needs: ['$[[ inputs.job_name_prefix ]]destroy'] needs: ['$[[ inputs.job_name_prefix ]]destroy']
...@@ -101,6 +101,10 @@ spec: ...@@ -101,6 +101,10 @@ spec:
default: '' default: ''
type: string type: string
description: 'Path to a variables files relative to root_dir.' description: 'Path to a variables files relative to root_dir.'
warning_on_none_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
--- ---
...@@ -167,6 +171,7 @@ include: ...@@ -167,6 +171,7 @@ include:
state_name: $[[ inputs.state_name ]] state_name: $[[ inputs.state_name ]]
plan_name: $[[ inputs.plan_name ]] plan_name: $[[ inputs.plan_name ]]
var_file: $[[ inputs.var_file ]] var_file: $[[ inputs.var_file ]]
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
- local: '/templates/apply.yml' - local: '/templates/apply.yml'
inputs: inputs:
as: '$[[ inputs.job_name_prefix ]]apply' as: '$[[ inputs.job_name_prefix ]]apply'
......
...@@ -125,6 +125,10 @@ spec: ...@@ -125,6 +125,10 @@ spec:
when: manual when: manual
type: array type: array
description: 'Defines the `rules` of the `apply` job.' description: 'Defines the `rules` of the `apply` job.'
warning_on_none_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
--- ---
...@@ -172,6 +176,7 @@ include: ...@@ -172,6 +176,7 @@ include:
artifacts_access: $[[ inputs.plan_artifacts_access ]] artifacts_access: $[[ inputs.plan_artifacts_access ]]
var_file: $[[ inputs.var_file ]] var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]] rules: $[[ inputs.plan_rules ]]
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
- local: '/templates/apply.yml' - local: '/templates/apply.yml'
inputs: inputs:
as: '$[[ inputs.job_name_prefix ]]apply' as: '$[[ inputs.job_name_prefix ]]apply'
......
...@@ -130,6 +130,10 @@ spec: ...@@ -130,6 +130,10 @@ spec:
- when: manual - when: manual
type: array type: array
description: 'Defines the `rules` of the `delete-state` job.' description: 'Defines the `rules` of the `delete-state` job.'
warning_on_none_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
--- ---
...@@ -178,6 +182,7 @@ include: ...@@ -178,6 +182,7 @@ include:
destroy: true destroy: true
var_file: $[[ inputs.var_file ]] var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]] rules: $[[ inputs.plan_rules ]]
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
- local: '/templates/destroy.yml' - local: '/templates/destroy.yml'
inputs: inputs:
as: '$[[ inputs.job_name_prefix ]]destroy' as: '$[[ inputs.job_name_prefix ]]destroy'
...@@ -206,5 +211,5 @@ include: ...@@ -206,5 +211,5 @@ include:
# job template, but the issue is that we cannot default it to something # job template, but the issue is that we cannot default it to something
# meaningful other than `null` - but `null` is also not yet supported, see # meaningful other than `null` - but `null` is also not yet supported, see
# https://gitlab.com/gitlab-org/gitlab/-/issues/440468 # https://gitlab.com/gitlab-org/gitlab/-/issues/440468
$[[ inputs.job_name_prefix ]]delete-state: '$[[ inputs.job_name_prefix ]]delete-state':
needs: ['$[[ inputs.job_name_prefix ]]destroy'] needs: ['$[[ inputs.job_name_prefix ]]destroy']
...@@ -111,6 +111,10 @@ spec: ...@@ -111,6 +111,10 @@ spec:
- if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead. - if: $CI_COMMIT_BRANCH # If there's no open merge request, add it to a *branch* pipeline instead.
type: array type: array
description: 'Defines the `rules` of the `plan` job.' description: 'Defines the `rules` of the `plan` job.'
warning_on_none_empty_plan:
default: false
type: boolean
description: 'Whether to mark the job with a warning if the plan contains a diff.'
--- ---
...@@ -158,3 +162,4 @@ include: ...@@ -158,3 +162,4 @@ include:
artifacts_access: $[[ inputs.artifacts_access ]] artifacts_access: $[[ inputs.artifacts_access ]]
var_file: $[[ inputs.var_file ]] var_file: $[[ inputs.var_file ]]
rules: $[[ inputs.plan_rules ]] rules: $[[ inputs.plan_rules ]]
warning_on_none_empty_plan: $[[ inputs.warning_on_none_empty_plan ]]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment