Add support for runscope plugin

This plugin allows you to add a Runscope API test as a build step into
your Jenkins build pipeline.

Change-Id: I836f158b798ea65871ab2214f2093bebf790be65
This commit is contained in:
Kevin Daniels 2015-10-30 12:25:22 -05:00
parent 4905458c69
commit 0e471a3a0f
4 changed files with 41 additions and 0 deletions

View File

@ -2728,3 +2728,28 @@ def openshift_svc_verify(parser, xml_parent, data):
]
convert_mapping_to_xml(osb, data, mapping)
def runscope(parser, xml_parent, data):
"""yaml: runscope
Execute a Runscope test.
Requires the Jenkins `Runscope Plugin.
<https://wiki.jenkins-ci.org/display/JENKINS/Runscope+Plugin>`_
:arg str test-trigger-url: Trigger URL for test. (Required)
:arg str access-token: OAuth Personal Access token. (Required)
:arg int timeout: Timeout for test duration in seconds. (Default: 60)
Example:
.. literalinclude:: /../../tests/builders/fixtures/runscope.yaml
"""
runscope = XML.SubElement(xml_parent,
'com.runscope.jenkins.Runscope.RunscopeBuilder')
try:
XML.SubElement(runscope, 'triggerEndPoint').text = data[
"test-trigger-url"]
XML.SubElement(runscope, 'accessToken').text = data["access-token"]
except KeyError as e:
raise MissingAttributeError(e.args[0])
XML.SubElement(runscope, 'timeout').text = str(data.get('timeout', '60'))

View File

@ -78,6 +78,7 @@ jenkins_jobs.builders =
powershell=jenkins_jobs.modules.builders:powershell
python=jenkins_jobs.modules.builders:python
raw=jenkins_jobs.modules.general:raw
runscope=jenkins_jobs.modules.builders:runscope
sbt=jenkins_jobs.modules.builders:sbt
shell=jenkins_jobs.modules.builders:shell
shining-panda=jenkins_jobs.modules.builders:shining_panda

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<builders>
<com.runscope.jenkins.Runscope.RunscopeBuilder>
<triggerEndPoint>https://api.runscope.com/radar/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/trigger</triggerEndPoint>
<accessToken>123456</accessToken>
<timeout>60</timeout>
</com.runscope.jenkins.Runscope.RunscopeBuilder>
</builders>
</project>

View File

@ -0,0 +1,5 @@
builders:
- runscope:
test-trigger-url: "https://api.runscope.com/radar/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/trigger"
access-token: "123456"
timeout: 60