summaryrefslogtreecommitdiffstats
path: root/tests/yamlparser/fixtures/jinja-include02.yaml
diff options
context:
space:
mode:
authorDaniel Watkins <daniel.watkins@canonical.com>2017-08-14 18:18:51 -0400
committerDaniel Watkins <daniel.watkins@canonical.com>2018-02-23 12:04:45 -0500
commitaa74f8d67cb89c80369d8d3096ee0851da9c5adb (patch)
treea60eb1566fcfcef8b9d46ac56f74f5887b102fe8 /tests/yamlparser/fixtures/jinja-include02.yaml
parentbc80e5e2f3d2eb8e871d38d1943a9ae555744dc3 (diff)
downloadpython-jenkins-job-builder-aa74f8d67cb89c80369d8d3096ee0851da9c5adb.tar.gz
python-jenkins-job-builder-aa74f8d67cb89c80369d8d3096ee0851da9c5adb.tar.xz
python-jenkins-job-builder-aa74f8d67cb89c80369d8d3096ee0851da9c5adb.zip
Add support for {% include %} in Jinja2 templates
This allows the use of the {% include %} tag[0] within Jinja2 templates, with the same search path used for looking up other templates (i.e. the one which LocalLoader is instantiated with). [0] http://jinja.pocoo.org/docs/2.9/templates/#include Change-Id: I0403c385ee317e1460a80a9bf717aa4712f37e2f
Diffstat (limited to 'tests/yamlparser/fixtures/jinja-include02.yaml')
-rw-r--r--tests/yamlparser/fixtures/jinja-include02.yaml14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/yamlparser/fixtures/jinja-include02.yaml b/tests/yamlparser/fixtures/jinja-include02.yaml
new file mode 100644
index 00000000..25a43d50
--- /dev/null
+++ b/tests/yamlparser/fixtures/jinja-include02.yaml
@@ -0,0 +1,14 @@
+- builder:
+ name: test-builder
+ builders:
+ - shell: !j2: "{% include 'jinja01.yaml.inc' %}"
+
+- job:
+ name: test-job
+ builders:
+ - test-builder:
+ var: "test variable"
+ test_list:
+ - a
+ - b
+ - c