Merge "add support for node-parameters option for multijob builder"

This commit is contained in:
Jenkins 2016-04-23 17:23:19 +00:00 committed by Gerrit Code Review
commit 0faccf37ae
3 changed files with 9 additions and 0 deletions

View File

@ -1564,6 +1564,8 @@ def multijob(parser, xml_parent, data):
* **node-label** (`str`) -- Define a label
of 'Restrict where this project can be run' on the fly.
Requires NodeLabel Parameter Plugin (optional)
* **node-parameters** (`bool`) -- Use the same Node for
the triggered builds that was used for this build. (optional)
* **git-revision** (`bool`) -- Pass current git-revision
to the other job (default false)
* **property-file** (`str`) -- Pass properties from file
@ -1624,6 +1626,11 @@ def multijob(parser, xml_parent, data):
XML.SubElement(node, 'name').text = nodeLabelName
XML.SubElement(node, 'nodeLabel').text = nodeLabel
# Node parameter
if project.get('node-parameters', False):
XML.SubElement(configs, 'hudson.plugins.parameterizedtrigger.'
'NodeParameters')
# Git Revision
if project.get('git-revision', False):
param = XML.SubElement(configs,

View File

@ -40,6 +40,7 @@
<jobName>PhaseTwoJobA</jobName>
<currParams>true</currParams>
<configs>
<hudson.plugins.parameterizedtrigger.NodeParameters/>
<hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>
<properties>foo=bar</properties>
</hudson.plugins.parameterizedtrigger.PredefinedBuildParameters>

View File

@ -19,6 +19,7 @@ builders:
- name: PhaseTwoJobA
current-parameters: true
predefined-parameters: foo=bar
node-parameters: true
- name: PhaseTwoJobB
current-parameters: false
kill-phase-on: UNSTABLE