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:
parent
8cfe815e88
commit
47ab1173e0
@ -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')
|
||||
|
3
tests/wrappers/fixtures/artifactory002.plugins_info.yaml
Normal file
3
tests/wrappers/fixtures/artifactory002.plugins_info.yaml
Normal file
@ -0,0 +1,3 @@
|
||||
- longName: 'Jenkins Artifactory Plugin'
|
||||
shortName: 'artifactory'
|
||||
version: "0"
|
Loading…
Reference in New Issue
Block a user