Merge "Default conditional-publisher to newest plugin format"

This commit is contained in:
Jenkins 2017-09-20 00:40:10 +00:00 committed by Gerrit Code Review
commit ea583ffe93
4 changed files with 15 additions and 4 deletions

View File

@ -27,6 +27,7 @@ the build is complete.
import logging
import pkg_resources
import sys
import xml.etree.ElementTree as XML
import six
@ -5590,10 +5591,11 @@ def conditional_publisher(registry, xml_parent, data):
action_parent = cond_publisher
plugin_info = \
registry.get_plugin_info("Flexible Publish Plugin")
version = pkg_resources.parse_version(plugin_info.get('version',
'0'))
plugin_info = registry.get_plugin_info("Flexible Publish Plugin")
# Note: Assume latest version of plugin is preferred config format
version = pkg_resources.parse_version(
plugin_info.get('version', str(sys.maxsize)))
# XML tag changed from publisher to publisherList in v0.13
# check the plugin version to determine further operations
use_publisher_list = version >= pkg_resources.parse_version("0.13")

View File

@ -0,0 +1,3 @@
- longName: 'Flexible Publish Plugin'
shortName: 'flexible-publish'
version: "0.1"

View File

@ -0,0 +1,3 @@
- longName: 'Flexible Publish Plugin'
shortName: 'flexible-publish'
version: "0.1"

View File

@ -0,0 +1,3 @@
- longName: 'Flexible Publish Plugin'
shortName: 'flexible-publish'
version: "0.1"