Merge "Adding support for LiveScreenshot Plugin"

This commit is contained in:
Jenkins 2015-07-03 12:18:52 +00:00 committed by Gerrit Code Review
commit 1285b4417a
6 changed files with 53 additions and 0 deletions

View File

@ -324,6 +324,34 @@ def ansicolor(parser, xml_parent, data):
XML.SubElement(cwrapper, 'colorMapName').text = colormap
def live_screenshot(parser, xml_parent, data):
"""yaml: live-screenshot
Show live screenshots of running jobs in the job list.
Requires the Jenkins :jenkins-wiki:`Live-Screenshot Plugin
<LiveScreenshot+Plugin>`.
:arg str full-size: name of screenshot file (default 'screenshot.png')
:arg str thumbnail: name of thumbnail file (default 'screenshot-thumb.png')
File type must be .png and they must be located inside the $WORKDIR.
Example using defaults:
.. literalinclude:: /../../tests/wrappers/fixtures/live_screenshot001.yaml
or specifying the files to use:
.. literalinclude:: /../../tests/wrappers/fixtures/live_screenshot002.yaml
"""
live = XML.SubElement(
xml_parent,
'org.jenkinsci.plugins.livescreenshot.LiveScreenshotBuildWrapper')
XML.SubElement(live, 'fullscreenFilename').text = data.get(
'full-size', 'screenshot.png')
XML.SubElement(live, 'thumbnailFilename').text = data.get(
'thumbnail', 'screenshot-thumb.png')
def mask_passwords(parser, xml_parent, data):
"""yaml: mask-passwords
Hide passwords in the console log.

View File

@ -247,6 +247,7 @@ jenkins_jobs.wrappers =
inject=jenkins_jobs.modules.wrappers:inject
jclouds=jenkins_jobs.modules.wrappers:jclouds
job-log-logger=jenkins_jobs.modules.wrappers:job_log_logger
live-screenshot=jenkins_jobs.modules.wrappers:live_screenshot
locks=jenkins_jobs.modules.wrappers:locks
logfilesize=jenkins_jobs.modules.wrappers:logfilesize
logstash=jenkins_jobs.modules.wrappers:logstash

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<buildWrappers>
<org.jenkinsci.plugins.livescreenshot.LiveScreenshotBuildWrapper>
<fullscreenFilename>screenshot.png</fullscreenFilename>
<thumbnailFilename>screenshot-thumb.png</thumbnailFilename>
</org.jenkinsci.plugins.livescreenshot.LiveScreenshotBuildWrapper>
</buildWrappers>
</project>

View File

@ -0,0 +1,2 @@
wrappers:
- live-screenshot

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<buildWrappers>
<org.jenkinsci.plugins.livescreenshot.LiveScreenshotBuildWrapper>
<fullscreenFilename>my_screenshot.png</fullscreenFilename>
<thumbnailFilename>my_screenshot-thumb.png</thumbnailFilename>
</org.jenkinsci.plugins.livescreenshot.LiveScreenshotBuildWrapper>
</buildWrappers>
</project>

View File

@ -0,0 +1,4 @@
wrappers:
- live-screenshot:
full-size: my_screenshot.png
thumbnail: my_screenshot-thumb.png