Add support for Fingerprint plugin
Change-Id: I3b3e20cfd89926d6423f307eabeb05932db65521 Signed-off-by: Kien Ha <kienha9922@gmail.com>
This commit is contained in:
parent
2bf92c3ed7
commit
c7ae7f86cb
@ -205,6 +205,35 @@ def change_assembly_version(parser, xml_parent, data):
|
|||||||
data.get('assembly-file', 'AssemblyInfo.cs'))
|
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):
|
def ant(parser, xml_parent, data):
|
||||||
"""yaml: ant
|
"""yaml: ant
|
||||||
Execute an ant target. Requires the Jenkins :jenkins-wiki:`Ant Plugin
|
Execute an ant target. Requires the Jenkins :jenkins-wiki:`Ant Plugin
|
||||||
|
8
tests/builders/fixtures/fingerprint-full.xml
Normal file
8
tests/builders/fixtures/fingerprint-full.xml
Normal 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>
|
3
tests/builders/fixtures/fingerprint-full.yaml
Normal file
3
tests/builders/fixtures/fingerprint-full.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
builders:
|
||||||
|
- fingerprint:
|
||||||
|
targets: module/dist/**/*.zip
|
8
tests/builders/fixtures/fingerprint-minimal.xml
Normal file
8
tests/builders/fixtures/fingerprint-minimal.xml
Normal 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>
|
2
tests/builders/fixtures/fingerprint-minimal.yaml
Normal file
2
tests/builders/fixtures/fingerprint-minimal.yaml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
builders:
|
||||||
|
- fingerprint
|
Loading…
Reference in New Issue
Block a user