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

Merge branch 'cache-policy' into 'main'

Support `cache_policy` input in job templates

See merge request components/opentofu!167
parents 9a505e84 53dc08b4
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
......@@ -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:
......
......@@ -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:
......
......@@ -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:
......
......@@ -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:
......
......@@ -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:
......
......@@ -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:
......
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment