Add support for Fingerprint plugin

Change-Id: I3b3e20cfd89926d6423f307eabeb05932db65521
Signed-off-by: Kien Ha <kienha9922@gmail.com>
This commit is contained in:
Kien Ha 2016-07-21 21:37:42 -04:00
parent 2bf92c3ed7
commit c7ae7f86cb
5 changed files with 50 additions and 0 deletions

View File

@ -205,6 +205,35 @@ def change_assembly_version(parser, xml_parent, data):
data.get('assembly-file', 'AssemblyInfo.cs'))
def fingerprint(parser, xml_parent, data):
"""yaml: fingerprint
Adds the ability to generate fingerprints as build steps instead of waiting
for a build to complete. Requires the Jenkins :jenkins-wiki:`Fingerprint
Plugin <Fingerprint+Plugin>`.
:arg str targets: Files to fingerprint (default '')
Full Example:
.. literalinclude::
/../../tests/builders/fixtures/fingerprint-full.yaml
:language: yaml
Minimal Example:
.. literalinclude::
/../../tests/builders/fixtures/fingerprint-minimal.yaml
:language: yaml
"""
fingerprint = XML.SubElement(
xml_parent, 'hudson.plugins.createfingerprint.CreateFingerprint')
fingerprint.set('plugin', 'create-fingerprint')
mapping = [('targets', 'targets', '')]
convert_mapping_to_xml(fingerprint, data, mapping, fail_required=True)
def ant(parser, xml_parent, data):
"""yaml: ant
Execute an ant target. Requires the Jenkins :jenkins-wiki:`Ant Plugin

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<builders>
<hudson.plugins.createfingerprint.CreateFingerprint plugin="create-fingerprint">
<targets>module/dist/**/*.zip</targets>
</hudson.plugins.createfingerprint.CreateFingerprint>
</builders>
</project>

View File

@ -0,0 +1,3 @@
builders:
- fingerprint:
targets: module/dist/**/*.zip

View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<project>
<builders>
<hudson.plugins.createfingerprint.CreateFingerprint plugin="create-fingerprint">
<targets/>
</hudson.plugins.createfingerprint.CreateFingerprint>
</builders>
</project>

View File

@ -0,0 +1,2 @@
builders:
- fingerprint