summaryrefslogtreecommitdiffstats
path: root/tests/publishers/fixtures
diff options
context:
space:
mode:
authorDarragh Bailey <dbailey@hpe.com>2018-08-23 14:53:47 +0100
committerDarragh Bailey <dbailey@hpe.com>2018-08-23 14:57:33 +0100
commitde4fb862f3469fc711e8adefcb2f2471427a3a84 (patch)
treed240fd6215a0b16f1be7a10e3d9c985bdef4ae89 /tests/publishers/fixtures
parent9f5fc4af8b3c65d480aa7778feec247f28cb3860 (diff)
downloadpython-jenkins-job-builder-de4fb862f3469fc711e8adefcb2f2471427a3a84.tar.gz
python-jenkins-job-builder-de4fb862f3469fc711e8adefcb2f2471427a3a84.tar.xz
python-jenkins-job-builder-de4fb862f3469fc711e8adefcb2f2471427a3a84.zip
Allow control of verbose option for publish-over plugins
The publish-over plugins all expose the option 'verbose' to all for lots of debug output from the connection to be outputted to the jenkins console. However by default this is supposed to be disabled ('false') so update the existing code to switch to the correct behaviour. Change-Id: Ie9acb1a005a25cd5c9f279cc89d5178eb8d54dd7
Diffstat (limited to 'tests/publishers/fixtures')
-rw-r--r--tests/publishers/fixtures/cifs-full.xml33
-rw-r--r--tests/publishers/fixtures/cifs-full.yaml (renamed from tests/publishers/fixtures/cifs001.yaml)8
-rw-r--r--tests/publishers/fixtures/cifs-minimal.xml (renamed from tests/publishers/fixtures/cifs001.xml)8
-rw-r--r--tests/publishers/fixtures/cifs-minimal.yaml5
-rw-r--r--tests/publishers/fixtures/ftp-full.xml34
-rw-r--r--tests/publishers/fixtures/ftp-full.yaml12
-rw-r--r--tests/publishers/fixtures/ftp-minimal.xml (renamed from tests/publishers/fixtures/ftp001.xml)8
-rw-r--r--tests/publishers/fixtures/ftp-minimal.yaml5
-rw-r--r--tests/publishers/fixtures/ftp001.yaml8
-rw-r--r--tests/publishers/fixtures/ssh-full.xml (renamed from tests/publishers/fixtures/ssh001.xml)10
-rw-r--r--tests/publishers/fixtures/ssh-full.yaml (renamed from tests/publishers/fixtures/ssh001.yaml)13
-rw-r--r--tests/publishers/fixtures/ssh-minimal.xml33
-rw-r--r--tests/publishers/fixtures/ssh-minimal.yaml5
13 files changed, 155 insertions, 27 deletions
diff --git a/tests/publishers/fixtures/cifs-full.xml b/tests/publishers/fixtures/cifs-full.xml
new file mode 100644
index 00000000..363348be
--- /dev/null
+++ b/tests/publishers/fixtures/cifs-full.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <publishers>
+ <jenkins.plugins.publish__over__cifs.CifsPublisherPlugin>
+ <consolePrefix>CIFS: </consolePrefix>
+ <delegate>
+ <publishers>
+ <jenkins.plugins.publish__over__cifs.CifsPublisher>
+ <configName>cifs.share</configName>
+ <verbose>true</verbose>
+ <transfers>
+ <jenkins.plugins.publish__over__cifs.CifsTransfer>
+ <remoteDirectory>'dest/dir/'yyyyMMddHHmmss</remoteDirectory>
+ <sourceFiles>base/source/dir/**</sourceFiles>
+ <excludes>**/*.excludedfiletype</excludes>
+ <removePrefix>base/source/dir</removePrefix>
+ <remoteDirectorySDF>true</remoteDirectorySDF>
+ <flatten>true</flatten>
+ <cleanRemote>true</cleanRemote>
+ </jenkins.plugins.publish__over__cifs.CifsTransfer>
+ </transfers>
+ <useWorkspaceInPromotion>false</useWorkspaceInPromotion>
+ <usePromotionTimestamp>false</usePromotionTimestamp>
+ </jenkins.plugins.publish__over__cifs.CifsPublisher>
+ </publishers>
+ <continueOnError>false</continueOnError>
+ <failOnError>true</failOnError>
+ <alwaysPublishFromMaster>false</alwaysPublishFromMaster>
+ <hostConfigurationAccess class="jenkins.plugins.publish_over_cifs.CifsPublisherPlugin" reference="../.."/>
+ </delegate>
+ </jenkins.plugins.publish__over__cifs.CifsPublisherPlugin>
+ </publishers>
+</project>
diff --git a/tests/publishers/fixtures/cifs001.yaml b/tests/publishers/fixtures/cifs-full.yaml
index 7d01766b..830e28d1 100644
--- a/tests/publishers/fixtures/cifs001.yaml
+++ b/tests/publishers/fixtures/cifs-full.yaml
@@ -1,8 +1,12 @@
publishers:
- cifs:
site: 'cifs.share'
- target: 'dest/dir'
+ target: "'dest/dir/'yyyyMMddHHmmss"
+ target-is-date-format: true
+ clean-remote: true
source: 'base/source/dir/**'
- remove-prefix: 'base/source/dir'
excludes: '**/*.excludedfiletype'
+ remove-prefix: 'base/source/dir'
+ fail-on-error: true
flatten: true
+ verbose: true
diff --git a/tests/publishers/fixtures/cifs001.xml b/tests/publishers/fixtures/cifs-minimal.xml
index 41e52bc6..14526143 100644
--- a/tests/publishers/fixtures/cifs001.xml
+++ b/tests/publishers/fixtures/cifs-minimal.xml
@@ -7,15 +7,15 @@
<publishers>
<jenkins.plugins.publish__over__cifs.CifsPublisher>
<configName>cifs.share</configName>
- <verbose>true</verbose>
+ <verbose>false</verbose>
<transfers>
<jenkins.plugins.publish__over__cifs.CifsTransfer>
<remoteDirectory>dest/dir</remoteDirectory>
<sourceFiles>base/source/dir/**</sourceFiles>
- <excludes>**/*.excludedfiletype</excludes>
- <removePrefix>base/source/dir</removePrefix>
+ <excludes/>
+ <removePrefix/>
<remoteDirectorySDF>false</remoteDirectorySDF>
- <flatten>true</flatten>
+ <flatten>false</flatten>
<cleanRemote>false</cleanRemote>
</jenkins.plugins.publish__over__cifs.CifsTransfer>
</transfers>
diff --git a/tests/publishers/fixtures/cifs-minimal.yaml b/tests/publishers/fixtures/cifs-minimal.yaml
new file mode 100644
index 00000000..dafe4294
--- /dev/null
+++ b/tests/publishers/fixtures/cifs-minimal.yaml
@@ -0,0 +1,5 @@
+publishers:
+ - cifs:
+ site: 'cifs.share'
+ target: 'dest/dir'
+ source: 'base/source/dir/**'
diff --git a/tests/publishers/fixtures/ftp-full.xml b/tests/publishers/fixtures/ftp-full.xml
new file mode 100644
index 00000000..e36cad8b
--- /dev/null
+++ b/tests/publishers/fixtures/ftp-full.xml
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <publishers>
+ <jenkins.plugins.publish__over__ftp.BapFtpPublisherPlugin>
+ <consolePrefix>FTP: </consolePrefix>
+ <delegate>
+ <publishers>
+ <jenkins.plugins.publish__over__ftp.BapFtpPublisher>
+ <configName>ftp.example.com</configName>
+ <verbose>true</verbose>
+ <transfers>
+ <jenkins.plugins.publish__over__ftp.BapFtpTransfer>
+ <remoteDirectory>'dest/dir/'yyyyMMddHHmmss</remoteDirectory>
+ <sourceFiles>base/source/dir/**</sourceFiles>
+ <excludes>**/*.excludedfiletype</excludes>
+ <removePrefix>base/source/dir</removePrefix>
+ <remoteDirectorySDF>true</remoteDirectorySDF>
+ <flatten>true</flatten>
+ <cleanRemote>true</cleanRemote>
+ <asciiMode>false</asciiMode>
+ </jenkins.plugins.publish__over__ftp.BapFtpTransfer>
+ </transfers>
+ <useWorkspaceInPromotion>false</useWorkspaceInPromotion>
+ <usePromotionTimestamp>false</usePromotionTimestamp>
+ </jenkins.plugins.publish__over__ftp.BapFtpPublisher>
+ </publishers>
+ <continueOnError>false</continueOnError>
+ <failOnError>true</failOnError>
+ <alwaysPublishFromMaster>false</alwaysPublishFromMaster>
+ <hostConfigurationAccess class="jenkins.plugins.publish_over_ftp.BapFtpPublisherPlugin" reference="../.."/>
+ </delegate>
+ </jenkins.plugins.publish__over__ftp.BapFtpPublisherPlugin>
+ </publishers>
+</project>
diff --git a/tests/publishers/fixtures/ftp-full.yaml b/tests/publishers/fixtures/ftp-full.yaml
new file mode 100644
index 00000000..bd6da185
--- /dev/null
+++ b/tests/publishers/fixtures/ftp-full.yaml
@@ -0,0 +1,12 @@
+publishers:
+ - ftp:
+ site: 'ftp.example.com'
+ target: "'dest/dir/'yyyyMMddHHmmss"
+ target-is-date-format: true
+ clean-remote: true
+ source: 'base/source/dir/**'
+ excludes: '**/*.excludedfiletype'
+ remove-prefix: 'base/source/dir'
+ fail-on-error: true
+ flatten: true
+ verbose: true
diff --git a/tests/publishers/fixtures/ftp001.xml b/tests/publishers/fixtures/ftp-minimal.xml
index c6431528..c5a24b0c 100644
--- a/tests/publishers/fixtures/ftp001.xml
+++ b/tests/publishers/fixtures/ftp-minimal.xml
@@ -7,15 +7,15 @@
<publishers>
<jenkins.plugins.publish__over__ftp.BapFtpPublisher>
<configName>ftp.example.com</configName>
- <verbose>true</verbose>
+ <verbose>false</verbose>
<transfers>
<jenkins.plugins.publish__over__ftp.BapFtpTransfer>
<remoteDirectory>dest/dir</remoteDirectory>
<sourceFiles>base/source/dir/**</sourceFiles>
- <excludes>**/*.excludedfiletype</excludes>
- <removePrefix>base/source/dir</removePrefix>
+ <excludes/>
+ <removePrefix/>
<remoteDirectorySDF>false</remoteDirectorySDF>
- <flatten>true</flatten>
+ <flatten>false</flatten>
<cleanRemote>false</cleanRemote>
<asciiMode>false</asciiMode>
</jenkins.plugins.publish__over__ftp.BapFtpTransfer>
diff --git a/tests/publishers/fixtures/ftp-minimal.yaml b/tests/publishers/fixtures/ftp-minimal.yaml
new file mode 100644
index 00000000..90f0d66c
--- /dev/null
+++ b/tests/publishers/fixtures/ftp-minimal.yaml
@@ -0,0 +1,5 @@
+publishers:
+ - ftp:
+ site: 'ftp.example.com'
+ target: 'dest/dir'
+ source: 'base/source/dir/**'
diff --git a/tests/publishers/fixtures/ftp001.yaml b/tests/publishers/fixtures/ftp001.yaml
deleted file mode 100644
index 368aa7d1..00000000
--- a/tests/publishers/fixtures/ftp001.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
-publishers:
-- ftp:
- site: 'ftp.example.com'
- target: 'dest/dir'
- source: 'base/source/dir/**'
- remove-prefix: 'base/source/dir'
- excludes: '**/*.excludedfiletype'
- flatten: true
diff --git a/tests/publishers/fixtures/ssh001.xml b/tests/publishers/fixtures/ssh-full.xml
index 44c82d5b..5a526490 100644
--- a/tests/publishers/fixtures/ssh001.xml
+++ b/tests/publishers/fixtures/ssh-full.xml
@@ -10,13 +10,13 @@
<verbose>true</verbose>
<transfers>
<jenkins.plugins.publish__over__ssh.BapSshTransfer>
- <remoteDirectory>dest/dir</remoteDirectory>
+ <remoteDirectory>'dest/dir/'yyyyMMddHHmmss</remoteDirectory>
<sourceFiles>base/source/dir/**</sourceFiles>
<excludes>**/*.excludedfiletype</excludes>
<removePrefix>base/source/dir</removePrefix>
- <remoteDirectorySDF>false</remoteDirectorySDF>
+ <remoteDirectorySDF>true</remoteDirectorySDF>
<flatten>true</flatten>
- <cleanRemote>false</cleanRemote>
+ <cleanRemote>true</cleanRemote>
<execCommand>rm -r jenkins_$BUILD_NUMBER</execCommand>
<execTimeout>1800000</execTimeout>
<usePty>true</usePty>
@@ -27,8 +27,8 @@
</jenkins.plugins.publish__over__ssh.BapSshPublisher>
</publishers>
<continueOnError>false</continueOnError>
- <failOnError>false</failOnError>
- <alwaysPublishFromMaster>false</alwaysPublishFromMaster>
+ <failOnError>true</failOnError>
+ <alwaysPublishFromMaster>true</alwaysPublishFromMaster>
<hostConfigurationAccess class="jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin" reference="../.."/>
</delegate>
</jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin>
diff --git a/tests/publishers/fixtures/ssh001.yaml b/tests/publishers/fixtures/ssh-full.yaml
index 344dfd09..fe6e94a1 100644
--- a/tests/publishers/fixtures/ssh001.yaml
+++ b/tests/publishers/fixtures/ssh-full.yaml
@@ -1,11 +1,16 @@
publishers:
- ssh:
site: 'server.example.com'
- target: 'dest/dir'
+ target: "'dest/dir/'yyyyMMddHHmmss"
+ target-is-date-format: true
+ clean-remote: true
source: 'base/source/dir/**'
- remove-prefix: 'base/source/dir'
- excludes: '**/*.excludedfiletype'
- use-pty: true
command: 'rm -r jenkins_$BUILD_NUMBER'
timeout: 1800000
+ use-pty: true
+ excludes: '**/*.excludedfiletype'
+ remove-prefix: 'base/source/dir'
+ fail-on-error: true
+ always-publish-from-master: true
flatten: true
+ verbose: true
diff --git a/tests/publishers/fixtures/ssh-minimal.xml b/tests/publishers/fixtures/ssh-minimal.xml
new file mode 100644
index 00000000..6d277f61
--- /dev/null
+++ b/tests/publishers/fixtures/ssh-minimal.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8"?>
+<project>
+ <publishers>
+ <jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin>
+ <consolePrefix>SSH: </consolePrefix>
+ <delegate>
+ <publishers>
+ <jenkins.plugins.publish__over__ssh.BapSshPublisher>
+ <configName>server.example.com</configName>
+ <verbose>false</verbose>
+ <transfers>
+ <jenkins.plugins.publish__over__ssh.BapSshTransfer>
+ <remoteDirectory>dest/dir/</remoteDirectory>
+ <sourceFiles>base/source/dir/**</sourceFiles>
+ <excludes/>
+ <removePrefix/>
+ <remoteDirectorySDF>false</remoteDirectorySDF>
+ <flatten>false</flatten>
+ <cleanRemote>false</cleanRemote>
+ </jenkins.plugins.publish__over__ssh.BapSshTransfer>
+ </transfers>
+ <useWorkspaceInPromotion>false</useWorkspaceInPromotion>
+ <usePromotionTimestamp>false</usePromotionTimestamp>
+ </jenkins.plugins.publish__over__ssh.BapSshPublisher>
+ </publishers>
+ <continueOnError>false</continueOnError>
+ <failOnError>false</failOnError>
+ <alwaysPublishFromMaster>false</alwaysPublishFromMaster>
+ <hostConfigurationAccess class="jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin" reference="../.."/>
+ </delegate>
+ </jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin>
+ </publishers>
+</project>
diff --git a/tests/publishers/fixtures/ssh-minimal.yaml b/tests/publishers/fixtures/ssh-minimal.yaml
new file mode 100644
index 00000000..f06eb4d8
--- /dev/null
+++ b/tests/publishers/fixtures/ssh-minimal.yaml
@@ -0,0 +1,5 @@
+publishers:
+ - ssh:
+ site: 'server.example.com'
+ target: 'dest/dir/'
+ source: 'base/source/dir/**'