summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAreum Cho <cho00052@algonquinlive.com>2018-06-23 18:11:05 -0400
committerThanh Ha <zxiiro@gmail.com>2019-04-09 09:24:20 +0800
commit55de2146757dc7badb310c1c153663e508b1613b (patch)
tree6c18c458edf5d48b006b8eee67e63c964a27aade /tests
parent23079af77770f736ce340eebabfeb4714fa25d89 (diff)
downloadpython-jenkins-job-builder-55de2146757dc7badb310c1c153663e508b1613b.tar.gz
python-jenkins-job-builder-55de2146757dc7badb310c1c153663e508b1613b.tar.xz
python-jenkins-job-builder-55de2146757dc7badb310c1c153663e508b1613b.zip
Add support for Packer plugin
Change-Id: Idcb85f53656efb07a6aafe28f60ecafd9011fab4 Co-Authored-By: Tan Heng Yeow <E0032242@u.nus.edu> Signed-off-by: Tan Heng Yeow <E0032242@u.nus.edu>
Diffstat (limited to 'tests')
-rw-r--r--tests/publishers/fixtures/packer-full.xml24
-rw-r--r--tests/publishers/fixtures/packer-full.yaml16
-rw-r--r--tests/publishers/fixtures/packer-minimal.xml14
-rw-r--r--tests/publishers/fixtures/packer-minimal.yaml3
4 files changed, 57 insertions, 0 deletions
diff --git a/tests/publishers/fixtures/packer-full.xml b/tests/publishers/fixtures/packer-full.xml
new file mode 100644
index 00000000..ffd07e3b
--- /dev/null
+++ b/tests/publishers/fixtures/packer-full.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <publishers>
+ <biz.neustar.jenkins.plugins.packer.PackerPublisher>
+ <name>test name</name>
+ <jsonTemplate>test template</jsonTemplate>
+ <jsonTemplateText>test template text</jsonTemplateText>
+ <params>additional params</params>
+ <useDebug>true</useDebug>
+ <changeDir>change to directory</changeDir>
+ <templateMode>global</templateMode>
+ <fileEntries>
+ <biz.neustar.jenkins.plugins.packer.PackerFileEntry>
+ <varFileName>test var</varFileName>
+ <contents>test content</contents>
+ </biz.neustar.jenkins.plugins.packer.PackerFileEntry>
+ <biz.neustar.jenkins.plugins.packer.PackerFileEntry>
+ <varFileName>test var 2</varFileName>
+ <contents>test content 2</contents>
+ </biz.neustar.jenkins.plugins.packer.PackerFileEntry>
+ </fileEntries>
+ </biz.neustar.jenkins.plugins.packer.PackerPublisher>
+ </publishers>
+</project>
diff --git a/tests/publishers/fixtures/packer-full.yaml b/tests/publishers/fixtures/packer-full.yaml
new file mode 100644
index 00000000..93efcacb
--- /dev/null
+++ b/tests/publishers/fixtures/packer-full.yaml
@@ -0,0 +1,16 @@
+publishers:
+ - packer:
+ name: test name
+ json-template: test template
+ json-template-text: test template text
+ add-params: additional params
+ use-debug: true
+ change-dir: change to directory
+ template-mode: global
+ file-entries:
+ - files:
+ variable-name: test var
+ contents: test content
+ - files:
+ variable-name: test var 2
+ contents: test content 2
diff --git a/tests/publishers/fixtures/packer-minimal.xml b/tests/publishers/fixtures/packer-minimal.xml
new file mode 100644
index 00000000..e5632749
--- /dev/null
+++ b/tests/publishers/fixtures/packer-minimal.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <publishers>
+ <biz.neustar.jenkins.plugins.packer.PackerPublisher>
+ <name>test name</name>
+ <jsonTemplate/>
+ <jsonTemplateText/>
+ <params/>
+ <useDebug>false</useDebug>
+ <changeDir/>
+ <templateMode>global</templateMode>
+ </biz.neustar.jenkins.plugins.packer.PackerPublisher>
+ </publishers>
+</project>
diff --git a/tests/publishers/fixtures/packer-minimal.yaml b/tests/publishers/fixtures/packer-minimal.yaml
new file mode 100644
index 00000000..5ddbe505
--- /dev/null
+++ b/tests/publishers/fixtures/packer-minimal.yaml
@@ -0,0 +1,3 @@
+publishers:
+ - packer:
+ name: test name