Merge "Add support for runscope plugin"

This commit is contained in:
Jenkins 2015-12-03 05:03:02 +00:00 committed by Gerrit Code Review
commit 93fc5869e1
4 changed files with 41 additions and 0 deletions

View File

@ -2732,3 +2732,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

@ -79,6 +79,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