summaryrefslogtreecommitdiffstats
path: root/tests/yamlparser/fixtures
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-02-24 16:31:13 +0000
committerGerrit Code Review <review@openstack.org>2018-02-24 16:31:13 +0000
commit70685b5dfe1feb57290dcf8e9f8df07394eb8692 (patch)
tree9cf26c15b32195dba189308631a7a4f4e1d8ef88 /tests/yamlparser/fixtures
parentbb1b44bc9276b564b0260b594c8b56e7d815bc93 (diff)
parentac7bcb53379310fb1a7d19c57dfc3cbc7b90053a (diff)
downloadpython-jenkins-job-builder-70685b5dfe1feb57290dcf8e9f8df07394eb8692.tar.gz
python-jenkins-job-builder-70685b5dfe1feb57290dcf8e9f8df07394eb8692.tar.xz
python-jenkins-job-builder-70685b5dfe1feb57290dcf8e9f8df07394eb8692.zip
Merge "Always deep format Jinja2 templates"
Diffstat (limited to 'tests/yamlparser/fixtures')
-rw-r--r--tests/yamlparser/fixtures/jinja-string02.xml19
-rw-r--r--tests/yamlparser/fixtures/jinja-string02.yaml4
-rw-r--r--tests/yamlparser/fixtures/jinja03.xml22
-rw-r--r--tests/yamlparser/fixtures/jinja03.yaml5
-rw-r--r--tests/yamlparser/fixtures/jinja03.yaml.inc3
5 files changed, 53 insertions, 0 deletions
diff --git a/tests/yamlparser/fixtures/jinja-string02.xml b/tests/yamlparser/fixtures/jinja-string02.xml
new file mode 100644
index 00000000..c61fef92
--- /dev/null
+++ b/tests/yamlparser/fixtures/jinja-string02.xml
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <actions/>
+ <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
+ <keepDependencies>false</keepDependencies>
+ <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+ <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+ <concurrentBuild>false</concurrentBuild>
+ <canRoam>true</canRoam>
+ <properties/>
+ <scm class="hudson.scm.NullSCM"/>
+ <builders>
+ <hudson.tasks.Shell>
+ <command>123</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers/>
+ <buildWrappers/>
+</project>
diff --git a/tests/yamlparser/fixtures/jinja-string02.yaml b/tests/yamlparser/fixtures/jinja-string02.yaml
new file mode 100644
index 00000000..e487ac8b
--- /dev/null
+++ b/tests/yamlparser/fixtures/jinja-string02.yaml
@@ -0,0 +1,4 @@
+- job:
+ name: test-job
+ builders:
+ - shell: !j2: "{% for x in [1, 2, 3] %}{{ x }}{% endfor %}"
diff --git a/tests/yamlparser/fixtures/jinja03.xml b/tests/yamlparser/fixtures/jinja03.xml
new file mode 100644
index 00000000..b2ca95fd
--- /dev/null
+++ b/tests/yamlparser/fixtures/jinja03.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <actions/>
+ <description>&lt;!-- Managed by Jenkins Job Builder --&gt;</description>
+ <keepDependencies>false</keepDependencies>
+ <blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
+ <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
+ <concurrentBuild>false</concurrentBuild>
+ <canRoam>true</canRoam>
+ <properties/>
+ <scm class="hudson.scm.NullSCM"/>
+ <builders>
+ <hudson.tasks.Shell>
+ <command>
+1
+2
+3</command>
+ </hudson.tasks.Shell>
+ </builders>
+ <publishers/>
+ <buildWrappers/>
+</project>
diff --git a/tests/yamlparser/fixtures/jinja03.yaml b/tests/yamlparser/fixtures/jinja03.yaml
new file mode 100644
index 00000000..6392074f
--- /dev/null
+++ b/tests/yamlparser/fixtures/jinja03.yaml
@@ -0,0 +1,5 @@
+- job:
+ name: test-job
+ builders:
+ - shell:
+ !include-jinja2: jinja03.yaml.inc
diff --git a/tests/yamlparser/fixtures/jinja03.yaml.inc b/tests/yamlparser/fixtures/jinja03.yaml.inc
new file mode 100644
index 00000000..ff2096f5
--- /dev/null
+++ b/tests/yamlparser/fixtures/jinja03.yaml.inc
@@ -0,0 +1,3 @@
+{% for x in [1, 2, 3] %}
+{{ x }}
+{%- endfor %}