Default artifactory-generic to newest plugin config format

Change-Id: I3a1f6185a0a71bb1444ba3e45790ecfce559e9f5
Signed-off-by: Thanh Ha <thanh.ha@linuxfoundation.org>
This commit is contained in:
Thanh Ha 2017-06-28 19:04:05 -04:00
parent 8cfe815e88
commit 47ab1173e0
No known key found for this signature in database
GPG Key ID: B0CB27E00DA095AA
2 changed files with 7 additions and 1 deletions

View File

@ -24,6 +24,7 @@ Wrappers can alter the way the build is run as well as the build output.
import logging
import pkg_resources
import sys
import xml.etree.ElementTree as XML
from jenkins_jobs.errors import InvalidAttributeError
@ -2124,7 +2125,9 @@ def artifactory_generic(registry, xml_parent, data):
# Get plugin information to maintain backwards compatibility
info = registry.get_plugin_info('artifactory')
version = pkg_resources.parse_version(info.get('version', '0'))
# Note: Assume latest version of plugin is preferred config format
version = pkg_resources.parse_version(
info.get('version', str(sys.maxsize)))
if version >= pkg_resources.parse_version('2.3.0'):
deployReleaseRepo = XML.SubElement(details, 'deployReleaseRepository')

View File

@ -0,0 +1,3 @@
- longName: 'Jenkins Artifactory Plugin'
shortName: 'artifactory'
version: "0"