Adopting changes from issue 26100

瀏覽次數:24 次
跳到第一則未讀訊息

Lakshmi Narasimhan

未讀,
2017年12月6日 凌晨2:15:362017/12/6
收件者:Jenkins Developers
I am trying to adopt the changes required in RTCScm due to changes in Jenkins core API.  Links to the Jira issue (https://issues.jenkins-ci.org/browse/JENKINS-26100) and Team Concert Plugin
There is a new method buildEnvironment(Run<?,?.. that needs  to be overriden in RTCScm. and this is available in Jenkins Core API 2.60.
Currently Team Concert Plugin is at 1.580.1. I want to keep the Jenkins version the same and just implement the buildEnvironment method in RTCScm. The expectation is that in Jenkins 2.60  and above, the checkout step  would find the new method in RTCScm and get the map with the required data.  Would this work?

Lakshmi Narasimhan

未讀,
2017年12月6日 清晨7:42:012017/12/6
收件者:Jenkins Developers
I am able to get this working without moving the Jenkins version. Since the method didn't have new types in it's signature, the plugin compiled fine . When deployed in Jenkins 2.6,  checkout step returned a map with the required environment variables.

Jesse Glick

未讀,
2017年12月6日 下午2:32:212017/12/6
收件者:Jenkins Dev
Right, Java recognizes overloads by signature, not by any bytecode marker, so your trick can work here.
回覆所有人
回覆作者
轉寄
0 則新訊息