import com.atlassian.jira.rpc.soap.client.* def JiraProjectKey = "WEB" JiraSoapServiceServiceLocator jiraSoapServiceLocator = new JiraSoapServiceServiceLocator(); def jiraSoapService = jiraSoapServiceLocator.getJirasoapserviceV2( new URL('https://jira.nexon.net/rpc/soap/jirasoapservice-v2')); String token = jiraSoapService.login('id', 'password'); def version = jiraSoapService.getVersions(token, JiraProjectKey).toList().sort().last() def m = version.getName() =~ /\d{1,3}/ return m[0] + "." + m[1] + "." + m[2]
Interesting in CI, Agile, Web development (C# MVC, REST API, CMS, NOSQL, jQuery, AngularJS, ember.js)
Friday, September 27, 2013
Jenkins - Get a last Jira version (groovy)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment