summaryrefslogtreecommitdiff
path: root/jenkins_jobs/modules/properties.py
diff options
context:
space:
mode:
Diffstat (limited to 'jenkins_jobs/modules/properties.py')
-rw-r--r--jenkins_jobs/modules/properties.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py
index c1dbc36..59b6b1a 100644
--- a/jenkins_jobs/modules/properties.py
+++ b/jenkins_jobs/modules/properties.py
@@ -241,6 +241,10 @@ def throttle(registry, xml_parent, data):
241 :arg list categories: multiproject throttle categories 241 :arg list categories: multiproject throttle categories
242 :arg bool matrix-builds: throttle matrix master builds (default true) 242 :arg bool matrix-builds: throttle matrix master builds (default true)
243 :arg bool matrix-configs: throttle matrix config builds (default false) 243 :arg bool matrix-configs: throttle matrix config builds (default false)
244 :arg str parameters-limit: prevent jobs with matching parameters from
245 running concurrently (default false)
246 :arg list parameters-check-list: Comma-separated list of parameters
247 to use when comparing jobs (optional)
244 248
245 Example: 249 Example:
246 250
@@ -269,6 +273,7 @@ def throttle(registry, xml_parent, data):
269 mapping = [ 273 mapping = [
270 ('', 'throttleOption', option), 274 ('', 'throttleOption', option),
271 ('', 'configVersion', '1'), 275 ('', 'configVersion', '1'),
276 ('parameters-limit', 'limitOneJobWithMatchingParams', False),
272 ] 277 ]
273 helpers.convert_mapping_to_xml(throttle, data, mapping, fail_required=True) 278 helpers.convert_mapping_to_xml(throttle, data, mapping, fail_required=True)
274 279
@@ -280,6 +285,10 @@ def throttle(registry, xml_parent, data):
280 helpers.convert_mapping_to_xml( 285 helpers.convert_mapping_to_xml(
281 matrixopt, data, mapping, fail_required=True) 286 matrixopt, data, mapping, fail_required=True)
282 287
288 params_to_use = data.get('parameters-check-list', [])
289 XML.SubElement(throttle, 'paramsToUseForLimit').text = ",".join(
290 params_to_use)
291
283 292
284def branch_api(registry, xml_parent, data): 293def branch_api(registry, xml_parent, data):
285 """yaml: branch-api 294 """yaml: branch-api