summaryrefslogtreecommitdiffstats
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.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/jenkins_jobs/modules/properties.py b/jenkins_jobs/modules/properties.py
index 22192e12..2907ec4f 100644
--- a/jenkins_jobs/modules/properties.py
+++ b/jenkins_jobs/modules/properties.py
@@ -580,7 +580,17 @@ def priority_sorter(registry, xml_parent, data):
plugin_info = registry.get_plugin_info('PrioritySorter')
version = pkg_resources.parse_version(plugin_info.get('version', '0'))
- if version >= pkg_resources.parse_version("2.0"):
+ if version >= pkg_resources.parse_version("3.0"):
+ priority_sorter_tag = XML.SubElement(
+ xml_parent,
+ 'jenkins.advancedqueue.jobinclusion.'
+ 'strategy.JobInclusionJobProperty')
+
+ mapping = [
+ ('use', 'useJobGroup', True),
+ ('priority', 'jobGroupName', None)
+ ]
+ elif version >= pkg_resources.parse_version("2.0"):
priority_sorter_tag = XML.SubElement(xml_parent,
'jenkins.advancedqueue.priority.'
'strategy.PriorityJobProperty')