Add suport for the Publish over SSH plugin.

Change-Id: Id06bd57c1d290df98c05b3cb19066013635199a3
Reviewed-on: https://review.openstack.org/26831
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Tested-by: Jenkins
This commit is contained in:
Kiall Mac Innes 2013-04-12 00:00:12 +01:00 committed by Jenkins
parent 5413f9dfb9
commit 50134954e8
2 changed files with 39 additions and 0 deletions

View File

@ -726,6 +726,44 @@ def scp(parser, xml_parent, data):
XML.SubElement(entry_e, 'copyAfterFailure').text = 'false' XML.SubElement(entry_e, 'copyAfterFailure').text = 'false'
def ssh(parser, xml_parent, data):
"""yaml: ssh
Upload files via SCP.
Requires the Jenkins `Publish over SSH Plugin.
<https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+SSH+Plugin>`_
:arg str site: name of the ssh site
:arg str target: destination directory
:arg str source: source path specifier
:arg str excludes: excluded file pattern (optional)
:arg str remove-prefix: prefix to remove from uploaded file paths
(optional)
Example::
publishers:
- ssh:
site: 'server.example.com'
target: 'dest/dir'
source: 'base/source/dir/**'
remove-prefix: 'base/source/dir'
excludes: '**/*.excludedfiletype'
"""
console_prefix = 'SSH: '
plugin_tag = 'jenkins.plugins.publish__over__ssh.BapSshPublisherPlugin'
publisher_tag = 'jenkins.plugins.publish__over__ssh.BapSshPublisher'
transfer_tag = 'jenkins.plugins.publish__over__ssh.BapSshTransfer'
plugin_reference_tag = 'jenkins.plugins.publish_over_ssh.' \
'BapSshPublisherPlugin'
base_publish_over(xml_parent,
data,
console_prefix,
plugin_tag,
publisher_tag,
transfer_tag,
plugin_reference_tag)
def pipeline(parser, xml_parent, data): def pipeline(parser, xml_parent, data):
"""yaml: pipeline """yaml: pipeline
Specify a downstream project in a pipeline. Specify a downstream project in a pipeline.

View File

@ -109,6 +109,7 @@ setuptools.setup(
'violations=jenkins_jobs.modules.publishers:violations', 'violations=jenkins_jobs.modules.publishers:violations',
'checkstyle=jenkins_jobs.modules.publishers:checkstyle', 'checkstyle=jenkins_jobs.modules.publishers:checkstyle',
'scp=jenkins_jobs.modules.publishers:scp', 'scp=jenkins_jobs.modules.publishers:scp',
'ssh=jenkins_jobs.modules.publishers:ssh',
'pipeline=jenkins_jobs.modules.publishers:pipeline', 'pipeline=jenkins_jobs.modules.publishers:pipeline',
'email=jenkins_jobs.modules.publishers:email', 'email=jenkins_jobs.modules.publishers:email',
'claim-build=jenkins_jobs.modules.publishers:claim_build', 'claim-build=jenkins_jobs.modules.publishers:claim_build',