Improve support for rvm plugin
rvm version greater than 0.5 requires a different ruby-class. This patch handles this case while maintaining backwards compatibility. Change-Id: I1fd03922e6125dd17c2bd41bf91560679edaeafc Story: #2000857 Task: #3476
This commit is contained in:
parent
ea7a61412d
commit
69477f814c
|
@ -683,6 +683,14 @@ def rvm_env(registry, xml_parent, data):
|
|||
'ruby-proxy-object')
|
||||
|
||||
ro_class = "Jenkins::Plugin::Proxies::BuildWrapper"
|
||||
|
||||
plugin_info = registry.get_plugin_info("RVM Plugin")
|
||||
plugin_ver = pkg_resources.parse_version(
|
||||
plugin_info.get("version", str(sys.maxsize)))
|
||||
|
||||
if plugin_ver >= pkg_resources.parse_version("0.5"):
|
||||
ro_class = "Jenkins::Tasks::BuildWrapperProxy"
|
||||
|
||||
ro = XML.SubElement(rpo,
|
||||
'ruby-object',
|
||||
{'ruby-class': ro_class,
|
||||
|
|
Loading…
Reference in New Issue