Add support for xvnc
Change-Id: I9af116a410e11da47178abd982035760b9a3195d
This commit is contained in:
parent
d2f69bc699
commit
8c110cafd1
@ -1284,6 +1284,30 @@ def custom_tools(parser, xml_parent, data):
|
||||
'convertHomesToUppercase').text = convert_home
|
||||
|
||||
|
||||
def xvnc(parser, xml_parent, data):
|
||||
"""yaml: xvnc
|
||||
Enable xvnc during the build.
|
||||
Requires the Jenkins `xvnc plugin.
|
||||
<https://wiki.jenkins-ci.org/display/JENKINS/Xvnc+Plugin>`_
|
||||
|
||||
:arg bool screenshot: Take screenshot upon build completion
|
||||
(default: false)
|
||||
:arg bool xauthority: Create a dedicated Xauthority file per build
|
||||
(default: true)
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/wrappers/fixtures/xvnc001.yaml
|
||||
|
||||
"""
|
||||
xwrapper = XML.SubElement(xml_parent,
|
||||
'hudson.plugins.xvnc.Xvnc')
|
||||
XML.SubElement(xwrapper, 'takeScreenshot').text = str(
|
||||
data.get('screenshot', False)).lower()
|
||||
XML.SubElement(xwrapper, 'useXauthority').text = str(
|
||||
data.get('xauthority', True)).lower()
|
||||
|
||||
|
||||
class Wrappers(jenkins_jobs.modules.base.Base):
|
||||
sequence = 80
|
||||
|
||||
|
@ -235,6 +235,7 @@ jenkins_jobs.wrappers =
|
||||
timeout=jenkins_jobs.modules.wrappers:timeout
|
||||
timestamps=jenkins_jobs.modules.wrappers:timestamps
|
||||
workspace-cleanup=jenkins_jobs.modules.wrappers:workspace_cleanup
|
||||
xvnc=jenkins_jobs.modules.wrappers:xvnc
|
||||
jenkins_jobs.modules =
|
||||
builders=jenkins_jobs.modules.builders:Builders
|
||||
general=jenkins_jobs.modules.general:General
|
||||
|
9
tests/wrappers/fixtures/xvnc001.xml
Normal file
9
tests/wrappers/fixtures/xvnc001.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<project>
|
||||
<buildWrappers>
|
||||
<hudson.plugins.xvnc.Xvnc>
|
||||
<takeScreenshot>true</takeScreenshot>
|
||||
<useXauthority>false</useXauthority>
|
||||
</hudson.plugins.xvnc.Xvnc>
|
||||
</buildWrappers>
|
||||
</project>
|
4
tests/wrappers/fixtures/xvnc001.yaml
Normal file
4
tests/wrappers/fixtures/xvnc001.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
wrappers:
|
||||
- xvnc:
|
||||
screenshot: true
|
||||
xauthority: false
|
Loading…
Reference in New Issue
Block a user