summaryrefslogtreecommitdiffstats
path: root/tests/yamlparser/fixtures/jinja-string03.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/yamlparser/fixtures/jinja-string03.yaml')
-rw-r--r--tests/yamlparser/fixtures/jinja-string03.yaml19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/yamlparser/fixtures/jinja-string03.yaml b/tests/yamlparser/fixtures/jinja-string03.yaml
new file mode 100644
index 00000000..28b6a1cf
--- /dev/null
+++ b/tests/yamlparser/fixtures/jinja-string03.yaml
@@ -0,0 +1,19 @@
+# Make sure Jinja subsittuions work from within "defaults"
+- defaults:
+ name: test-defaults
+ test_var:
+ !j2: "{% for x in [1, 2, 3] %}{{ x }}{% endfor %}"
+
+- project:
+ name: test-proj
+ jobs:
+ - test-jobs-{argument}:
+ argument:
+ - 1
+
+# This type of variable propagation only works in job templates.
+- job-template:
+ name: test-jobs-{argument}
+ defaults: test-defaults
+ builders:
+ - shell: "{test_var}"