Add matrixOptions to throttle properties module
Change-Id: Id5021ed55a45ca951b9a24f5790f4a7313b1dff1
This commit is contained in:
parent
d26293fe2f
commit
97635cfbdd
@ -167,6 +167,8 @@ def throttle(parser, xml_parent, data):
|
||||
:arg bool enabled: whether throttling is enabled (default true)
|
||||
:arg str option: throttle `project` or `category`
|
||||
:arg list categories: multiproject throttle categories
|
||||
:arg bool matrix-builds: throttle matrix master builds (default true)
|
||||
:arg bool matrix-configs: throttle matrix config builds (default false)
|
||||
|
||||
Example:
|
||||
|
||||
@ -195,6 +197,12 @@ def throttle(parser, xml_parent, data):
|
||||
XML.SubElement(throttle, 'throttleOption').text = data.get('option')
|
||||
XML.SubElement(throttle, 'configVersion').text = '1'
|
||||
|
||||
matrixopt = XML.SubElement(throttle, 'matrixOptions')
|
||||
XML.SubElement(matrixopt, 'throttleMatrixBuilds').text = str(
|
||||
data.get('matrix-builds', True)).lower()
|
||||
XML.SubElement(matrixopt, 'throttleMatrixConfigurations').text = str(
|
||||
data.get('matrix-configs', False)).lower()
|
||||
|
||||
|
||||
def sidebar(parser, xml_parent, data):
|
||||
"""yaml: sidebar
|
||||
|
@ -11,6 +11,10 @@
|
||||
</categories>
|
||||
<throttleOption>category</throttleOption>
|
||||
<configVersion>1</configVersion>
|
||||
<matrixOptions>
|
||||
<throttleMatrixBuilds>false</throttleMatrixBuilds>
|
||||
<throttleMatrixConfigurations>true</throttleMatrixConfigurations>
|
||||
</matrixOptions>
|
||||
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
|
||||
</properties>
|
||||
</project>
|
||||
|
@ -6,3 +6,5 @@ properties:
|
||||
- cat1
|
||||
- cat2
|
||||
option: category
|
||||
matrix-builds: false
|
||||
matrix-configs: true
|
||||
|
@ -11,6 +11,10 @@
|
||||
</categories>
|
||||
<throttleOption>project</throttleOption>
|
||||
<configVersion>1</configVersion>
|
||||
<matrixOptions>
|
||||
<throttleMatrixBuilds>true</throttleMatrixBuilds>
|
||||
<throttleMatrixConfigurations>false</throttleMatrixConfigurations>
|
||||
</matrixOptions>
|
||||
</hudson.plugins.throttleconcurrents.ThrottleJobProperty>
|
||||
</properties>
|
||||
</project>
|
||||
|
Loading…
Reference in New Issue
Block a user