Merge "add support for node-parameters option for multijob builder"
This commit is contained in:
commit
0faccf37ae
@ -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,
|
||||
|
@ -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>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user