diff --git a/templates/apply.yml b/templates/apply.yml index adaec3773afaa46bd6bb04850404c6a0f75fc8be..718414586561db956fe71b519c8700aab998bc2d 100644 --- a/templates/apply.yml +++ b/templates/apply.yml @@ -95,6 +95,10 @@ spec: default: [{when: on_success}] type: array description: 'Defines the `rules` of the job.' + cache_policy: + default: pull-push + type: string + description: 'Defines the cache policy of the job.' --- @@ -107,6 +111,7 @@ spec: rules: $[[ inputs.rules ]] cache: key: "$__CACHE_KEY_HACK" + policy: $[[ inputs.cache_policy ]] paths: - $TF_ROOT/.terraform/ variables: diff --git a/templates/custom-command.yml b/templates/custom-command.yml index 49bb1712a7c02bff47b9ba5746e53cff42c3780f..762d46af498c9f2b107c2247545aebbd104aab39 100644 --- a/templates/custom-command.yml +++ b/templates/custom-command.yml @@ -82,6 +82,11 @@ spec: type: array description: 'Defines the `needs` of the job.' + cache_policy: + default: pull-push + type: string + description: 'Defines the cache policy of the job.' + --- '$[[ inputs.as ]]': @@ -89,6 +94,7 @@ spec: needs: $[[ inputs.needs ]] cache: key: "$__CACHE_KEY_HACK" + policy: $[[ inputs.cache_policy ]] paths: - $TF_ROOT/.terraform/ variables: diff --git a/templates/destroy.yml b/templates/destroy.yml index 4519979daaa170364c408f3b9681a056c0890509..69af6285da96d68bb752ba651fc4c99412d6a325 100644 --- a/templates/destroy.yml +++ b/templates/destroy.yml @@ -95,6 +95,10 @@ spec: default: [{when: on_success}] type: array description: 'Defines the `rules` of the job.' + cache_policy: + default: pull-push + type: string + description: 'Defines the cache policy of the job.' --- @@ -107,6 +111,7 @@ spec: rules: $[[ inputs.rules ]] cache: key: "$__CACHE_KEY_HACK" + policy: $[[ inputs.cache_policy ]] paths: - $TF_ROOT/.terraform/ variables: diff --git a/templates/fmt.yml b/templates/fmt.yml index cba5d838054b8f39658515baac3f350783a40919..59ac9ce40039cbf609c7570a44d71760caea5df5 100644 --- a/templates/fmt.yml +++ b/templates/fmt.yml @@ -92,6 +92,11 @@ spec: type: array description: 'Defines the `rules` of the job.' + cache_policy: + default: pull-push + type: string + description: 'Defines the cache policy of the job.' + --- '$[[ inputs.as ]]': @@ -101,6 +106,7 @@ spec: allow_failure: $[[ inputs.allow_failure ]] cache: key: "$__CACHE_KEY_HACK" + policy: $[[ inputs.cache_policy ]] paths: - $TF_ROOT/.terraform/ variables: diff --git a/templates/graph.yml b/templates/graph.yml index 27b0296809d5cf89627c096cf5d48432ebcdc052..0e57dee3abe9799a754028817a1f4821d22f1798 100644 --- a/templates/graph.yml +++ b/templates/graph.yml @@ -89,6 +89,10 @@ spec: default: [] type: array description: 'Defines the `needs` of the job.' + cache_policy: + default: pull-push + type: string + description: 'Defines the cache policy of the job.' --- @@ -97,6 +101,7 @@ spec: needs: $[[ inputs.needs ]] cache: key: "$__CACHE_KEY_HACK" + policy: $[[ inputs.cache_policy ]] paths: - $TF_ROOT/.terraform/ variables: diff --git a/templates/plan.yml b/templates/plan.yml index 9987fcd660cff0eb1ada40b154a6162c7d3579d0..659903c12ee97c68e988b434ea30c292170eefdb 100644 --- a/templates/plan.yml +++ b/templates/plan.yml @@ -94,6 +94,10 @@ spec: default: [{when: on_success}] type: array description: 'Defines the `rules` of the job.' + cache_policy: + default: pull-push + type: string + description: 'Defines the cache policy of the job.' --- @@ -116,6 +120,7 @@ spec: rules: $[[ inputs.rules ]] cache: key: "$__CACHE_KEY_HACK" + policy: $[[ inputs.cache_policy ]] paths: - $TF_ROOT/.terraform/ variables: diff --git a/templates/test.yml b/templates/test.yml index 19786691e493cf613b0f62577667bda7aa8edce3..ff98fccc6837370adabd445b663f875c2d794703 100644 --- a/templates/test.yml +++ b/templates/test.yml @@ -91,6 +91,10 @@ spec: default: [{when: on_success}] type: array description: 'Defines the `rules` of the job.' + cache_policy: + default: pull-push + type: string + description: 'Defines the cache policy of the job.' --- @@ -100,6 +104,7 @@ spec: rules: $[[ inputs.rules ]] cache: key: "$__CACHE_KEY_HACK" + policy: $[[ inputs.cache_policy ]] paths: - $TF_ROOT/.terraform/ variables: diff --git a/templates/validate.yml b/templates/validate.yml index 22b1ab535e34a6ac4569ac26eaf8517ceccaa4fb..49b58274b748450d5787c13342b1b6ad1c8936f0 100644 --- a/templates/validate.yml +++ b/templates/validate.yml @@ -88,6 +88,11 @@ spec: type: array description: 'Defines the `rules` of the job.' + cache_policy: + default: pull-push + type: string + description: 'Defines the cache policy of the job.' + --- '$[[ inputs.as ]]': @@ -95,6 +100,7 @@ spec: rules: $[[ inputs.rules ]] cache: key: "$__CACHE_KEY_HACK" + policy: $[[ inputs.cache_policy ]] paths: - $TF_ROOT/.terraform/ variables: