Support Matrix Tie Parent Plugin in wrappers
Change-Id: I9c55ed443496bf4573969f83750c46bd678290a7
This commit is contained in:
parent
1b88a66db2
commit
4a1bc78272
@ -951,6 +951,24 @@ def delivery_pipeline(parser, xml_parent, data):
|
||||
'set-display-name', False)).lower()
|
||||
|
||||
|
||||
def matrix_tie_parent(parser, xml_parent, data):
|
||||
"""yaml: matrix-tie-parent
|
||||
Tie parent to a node.
|
||||
Requires the Jenkins `Matrix Tie Parent Plugin.
|
||||
<https://wiki.jenkins-ci.org/display/JENKINS/Matrix+Tie+Parent+Plugin>`_
|
||||
Note that from Jenkins version 1.532 this plugin's functionality is
|
||||
available under the "advanced" option of the matrix project configuration.
|
||||
|
||||
:arg str node: Name of the node.
|
||||
|
||||
Example:
|
||||
|
||||
.. literalinclude:: /../../tests/wrappers/fixtures/matrix-tie-parent.yaml
|
||||
"""
|
||||
mtp = XML.SubElement(xml_parent, 'matrixtieparent.BuildWrapperMtp')
|
||||
XML.SubElement(mtp, 'labelName').text = data['node']
|
||||
|
||||
|
||||
class Wrappers(jenkins_jobs.modules.base.Base):
|
||||
sequence = 80
|
||||
|
||||
|
@ -176,6 +176,7 @@ jenkins_jobs.wrappers =
|
||||
locks=jenkins_jobs.modules.wrappers:locks
|
||||
logstash=jenkins_jobs.modules.wrappers:logstash
|
||||
mask-passwords=jenkins_jobs.modules.wrappers:mask_passwords
|
||||
matrix-tie-parent=jenkins_jobs.modules.wrappers:matrix_tie_parent
|
||||
pathignore=jenkins_jobs.modules.wrappers:pathignore
|
||||
port-allocator=jenkins_jobs.modules.wrappers:port_allocator
|
||||
pre-scm-buildstep=jenkins_jobs.modules.wrappers:pre_scm_buildstep
|
||||
|
13
tests/wrappers/fixtures/matrix-tie-parent.xml
Normal file
13
tests/wrappers/fixtures/matrix-tie-parent.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<matrix-project>
|
||||
<executionStrategy class="hudson.matrix.DefaultMatrixExecutionStrategyImpl">
|
||||
<runSequentially>false</runSequentially>
|
||||
</executionStrategy>
|
||||
<combinationFilter/>
|
||||
<axes/>
|
||||
<buildWrappers>
|
||||
<matrixtieparent.BuildWrapperMtp>
|
||||
<labelName>Unix</labelName>
|
||||
</matrixtieparent.BuildWrapperMtp>
|
||||
</buildWrappers>
|
||||
</matrix-project>
|
4
tests/wrappers/fixtures/matrix-tie-parent.yaml
Normal file
4
tests/wrappers/fixtures/matrix-tie-parent.yaml
Normal file
@ -0,0 +1,4 @@
|
||||
project-type: matrix
|
||||
wrappers:
|
||||
- matrix-tie-parent:
|
||||
node: Unix
|
Loading…
x
Reference in New Issue
Block a user