diff --git a/templates/full-pipeline.yml b/templates/full-pipeline.yml index c61819795650dfb7dbc48b2b63604fcdeab071f7..c536e99ef31da8db30b68e70a8e1d0dcce200450 100644 --- a/templates/full-pipeline.yml +++ b/templates/full-pipeline.yml @@ -96,6 +96,10 @@ spec: plan_artifacts_access: default: 'none' description: 'Access level for the plan artifact. See https://docs.gitlab.com/ee/ci/yaml/#artifactsaccess for possible values.' + plan_artifacts: + default: [] + type: array + description: 'Extra artifacts to upload from the plan' var_file: default: '' type: string @@ -310,6 +314,7 @@ include: state_name: $[[ inputs.state_name ]] plan_name: $[[ inputs.plan_name ]] artifacts_access: $[[ inputs.plan_artifacts_access ]] + artifacts: $[[ inputs.plan_artifacts ]] var_file: $[[ inputs.var_file ]] rules: $[[ inputs.plan_rules ]] warning_on_non_empty_plan: $[[ inputs.warning_on_non_empty_plan ]] @@ -443,6 +448,7 @@ stages: state_name: $[[ inputs.state_name]] plan_name: $[[ inputs.plan_name ]] plan_artifacts_access: $[[ inputs.plan_artifacts_access ]] + plan_artifacts: $[[ inputs.plan_artifacts ]] var_file: $[[ inputs.var_file ]] fmt_allow_failure: $[[ inputs.fmt_allow_failure ]] fmt_rules: $[[ inputs.fmt_rules ]] diff --git a/templates/plan.yml b/templates/plan.yml index 096db7471c49177efcdf14fdb68a1234cde68856..60c7127b0f3ef01d1a344c97f8894fc7d7d30666 100644 --- a/templates/plan.yml +++ b/templates/plan.yml @@ -74,6 +74,10 @@ spec: artifacts_access: default: 'none' description: 'Access level for the plan artifact. See https://docs.gitlab.com/ee/ci/yaml/#artifactsaccess for possible values.' + artifacts: + default: [] + type: array + description: 'Extra artifacts to upload from the plan' var_file: default: '' type: string @@ -197,6 +201,7 @@ include: access: '$[[ inputs.artifacts_access ]]' paths: - $GITLAB_TOFU_ROOT_DIR/$[[ inputs.plan_name ]].cache + - '$[[ inputs.artifacts ]]' reports: terraform: $GITLAB_TOFU_ROOT_DIR/$[[ inputs.plan_name]].json rules: $[[ inputs.rules ]] diff --git a/templates/validate-plan-apply.yml b/templates/validate-plan-apply.yml index 2a358dc4c2923df69e09f2eb7e4db49a108f43ca..891b199b27ce2a9b2ed14a128e43d0b4083d2308 100644 --- a/templates/validate-plan-apply.yml +++ b/templates/validate-plan-apply.yml @@ -83,6 +83,10 @@ spec: plan_artifacts_access: default: 'none' description: 'Access level for the plan artifact. See https://docs.gitlab.com/ee/ci/yaml/#artifactsaccess for possible values.' + plan_artifacts: + default: [] + type: array + description: 'Extra artifacts to upload from the plan' var_file: default: '' type: string @@ -248,6 +252,7 @@ include: state_name: $[[ inputs.state_name ]] plan_name: $[[ inputs.plan_name ]] artifacts_access: $[[ inputs.plan_artifacts_access ]] + artifacts: $[[ inputs.plan_artifacts ]] var_file: $[[ inputs.var_file ]] rules: $[[ inputs.plan_rules ]] cache_policy: pull @@ -332,6 +337,7 @@ stages: state_name: $[[ inputs.state_name]] plan_name: $[[ inputs.plan_name ]] plan_artifacts_access: $[[ inputs.plan_artifacts_access ]] + plan_artifacts: $[[ inputs.plan_artifacts ]] var_file: $[[ inputs.var_file ]] fmt_rules: $[[ inputs.fmt_rules ]] fmt_allow_failure: $[[ inputs.fmt_allow_failure ]] diff --git a/templates/validate-plan-destroy.yml b/templates/validate-plan-destroy.yml index 78cd203133192ce795a5ccacfcf23b1aaca650c4..c8f6d57f6667fab88158a36c6672848031b41968 100644 --- a/templates/validate-plan-destroy.yml +++ b/templates/validate-plan-destroy.yml @@ -76,6 +76,10 @@ spec: plan_artifacts_access: default: 'none' description: 'Access level for the plan artifact. See https://docs.gitlab.com/ee/ci/yaml/#artifactsaccess for possible values.' + plan_artifacts: + default: [] + type: array + description: 'Extra artifacts to upload from the plan' # FIXME: at the moment we cannot support this input # because we cannot nest inputs: https://gitlab.com/gitlab-org/gitlab/-/issues/438722 # If you want to auto destroy, please refer to the `rules` input. @@ -254,6 +258,7 @@ include: state_name: $[[ inputs.state_name ]] plan_name: $[[ inputs.plan_name ]] artifacts_access: $[[ inputs.plan_artifacts_access ]] + artifacts: $[[ inputs.plan_artifacts ]] destroy: true var_file: $[[ inputs.var_file ]] rules: $[[ inputs.plan_rules ]] @@ -364,6 +369,7 @@ stages: state_name: $[[ inputs.state_name]] plan_name: $[[ inputs.plan_name ]] plan_artifacts_access: $[[ inputs.plan_artifacts_access ]] + plan_artifacts: $[[ inputs.plan_artifacts ]] var_file: $[[ inputs.var_file ]] fmt_allow_failure: $[[ inputs.fmt_allow_failure ]] fmt_rules: $[[ inputs.fmt_rules ]] diff --git a/templates/validate-plan.yml b/templates/validate-plan.yml index 9f7061d90b37a9c65a8c8cff43c217494576aab0..605f095b006ac63f050bab3296e7bab33f4f1001 100644 --- a/templates/validate-plan.yml +++ b/templates/validate-plan.yml @@ -73,6 +73,10 @@ spec: artifacts_access: default: 'none' description: 'Access level for the plan artifact. See https://docs.gitlab.com/ee/ci/yaml/#artifactsaccess for possible values.' + plan_artifacts: + default: [] + type: array + description: 'Extra artifacts to upload from the plan' var_file: default: '' type: string @@ -232,6 +236,7 @@ include: state_name: $[[ inputs.state_name ]] plan_name: $[[ inputs.plan_name ]] artifacts_access: $[[ inputs.artifacts_access ]] + artifacts: $[[ inputs.plan_artifacts ]] var_file: $[[ inputs.var_file ]] rules: $[[ inputs.plan_rules ]] cache_policy: pull @@ -289,6 +294,7 @@ stages: state_name: $[[ inputs.state_name]] plan_name: $[[ inputs.plan_name ]] artifacts_access: $[[ inputs.artifacts_access ]] + artifacts: $[[ inputs.plan_artifacts ]] var_file: $[[ inputs.var_file ]] fmt_allow_failure: $[[ inputs.fmt_allow_failure ]] fmt_rules: $[[ inputs.fmt_rules ]]