diff --git a/templates/full-pipeline.yml b/templates/full-pipeline.yml index 265d27e0ad332fd0975fc2da77ada34cdee684e8..708f6dd5271cdb6bfdf2d82ee869c8229c338c85 100644 --- a/templates/full-pipeline.yml +++ b/templates/full-pipeline.yml @@ -76,6 +76,9 @@ spec: description: 'Image digest of the image you want to use. The format must be `@<image_digest>`, e.g. `@sha256:abc..`, see regex of this input. Please consult the release page at https://gitlab.com/components/opentofu/-/releases to obtain the image digests.' # Configuration + job_name_prefix: + default: '' + description: 'Prefix for all job names. Jobs will be hidden if leading with a dot `.`.' root_dir: default: ${CI_PROJECT_DIR} description: 'Root directory for the OpenTofu project.' @@ -99,7 +102,7 @@ spec: include: - local: '/templates/fmt.yml' inputs: - as: 'fmt' + as: '$[[ inputs.job_name_prefix ]]fmt' stage: $[[ inputs.stage_validate ]] version: $[[ inputs.version ]] base_os: $[[ inputs.base_os ]] @@ -110,7 +113,7 @@ include: root_dir: $[[ inputs.root_dir ]] - local: '/templates/validate.yml' inputs: - as: 'validate' + as: '$[[ inputs.job_name_prefix ]]validate' stage: $[[ inputs.stage_validate ]] version: $[[ inputs.version ]] base_os: $[[ inputs.base_os ]] @@ -122,7 +125,7 @@ include: state_name: $[[ inputs.state_name ]] - local: '/templates/test.yml' inputs: - as: 'test' + as: '$[[ inputs.job_name_prefix ]]test' stage: $[[ inputs.stage_test ]] version: $[[ inputs.version ]] base_os: $[[ inputs.base_os ]] @@ -137,7 +140,7 @@ include: - $[[ inputs.root_dir ]]/**/*.tftest.hcl - local: '/templates/plan.yml' inputs: - as: 'plan' + as: '$[[ inputs.job_name_prefix ]]plan' stage: $[[ inputs.stage_build ]] version: $[[ inputs.version ]] base_os: $[[ inputs.base_os ]] @@ -150,7 +153,7 @@ include: artifacts_access: $[[ inputs.plan_artifacts_access ]] - local: '/templates/apply.yml' inputs: - as: 'apply' + as: '$[[ inputs.job_name_prefix ]]apply' stage: $[[ inputs.stage_deploy ]] version: $[[ inputs.version ]] base_os: $[[ inputs.base_os ]] @@ -163,7 +166,7 @@ include: auto_apply: $[[ inputs.auto_apply ]] - local: '/templates/destroy.yml' inputs: - as: 'destroy' + as: '$[[ inputs.job_name_prefix ]]destroy' stage: $[[ inputs.stage_cleanup ]] version: $[[ inputs.version ]] base_os: $[[ inputs.base_os ]] @@ -176,7 +179,7 @@ include: auto_destroy: $[[ inputs.auto_destroy ]] - local: '/templates/delete-state.yml' inputs: - as: 'delete-state' + as: '$[[ inputs.job_name_prefix ]]delete-state' stage: $[[ inputs.stage_cleanup ]] state_name: $[[ inputs.state_name ]]