-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(template): support template strings in
ConfigTemplate.configs
(#…
…5796) * fix(template): support template strings in `ConfigTemplate.configs` * test(template): fix some test assertions * test(template): fix more test assertions * test(template): add new test case * fix(template): pass config source to string resolver
- Loading branch information
1 parent
ada699a
commit bf51aa0
Showing
7 changed files
with
103 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
core/test/data/test-projects/config-templates-with-templating/project.garden.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: garden.io/v1 | ||
kind: Project | ||
name: config-templates-with-templating | ||
environments: | ||
- name: local | ||
providers: | ||
- name: local-kubernetes | ||
environments: [local] |
5 changes: 5 additions & 0 deletions
5
core/test/data/test-projects/config-templates-with-templating/runs.garden.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
kind: RenderTemplate | ||
template: template-runs | ||
name: my-runs | ||
inputs: | ||
names: ["run-a", "run-b"] |
8 changes: 8 additions & 0 deletions
8
core/test/data/test-projects/config-templates-with-templating/schema.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"names": { | ||
"type": "array" | ||
} | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
core/test/data/test-projects/config-templates-with-templating/tempate.garden.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
kind: ConfigTemplate | ||
name: template-runs | ||
inputsSchemaPath: schema.json | ||
|
||
configs: | ||
- $concat: | ||
$forEach: ${inputs.names} | ||
$return: | ||
kind: Run | ||
type: exec | ||
name: "${item.value}" | ||
spec: | ||
command: ["echo", "${item.value}"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters