It's all about the answers!

Ask a question

Is there an equal to SCMPlatform class in server API?


Manuel Felipe Amaya (132326) | asked Jan 22 '16, 10:21 a.m.
Hi,

I've been extending some features in order to streamline the deployment process and at this stage I would like to make a participant that is activated when changing state. The participant would trigger a build, just like the one in the RTC extensions workshop. However, the build will run against a variety of workspaces.

So far I have managed to change programmatically the workspace that the builddef uses to run the build, but I couldn't get the Workspace by name using server API.

On another post someone asked something alike and the answer was related to com.ibm.team.scm.client.SCMPlatform class.

Is there some class that could be used on the server API that would offer the same results?

Accepted answer


permanent link
sam detweiler (12.4k6175200) | answered Jan 22 '16, 10:33 a.m.
IScmService

I have a deliver plugin that will launch a script and pass it parameters.. just like a git/svm commit hook.

see the last post here
https://jazz.net/forum/questions/132739/jenkins-polling-is-too-slow-can-rtc-notify-jenkins-immediately

note the post before this one does RTC build launching, while mine is open to use any tooling.

Manuel Felipe Amaya selected this answer as the correct answer

One other answer



permanent link
Manuel Felipe Amaya (132326) | answered Jan 22 '16, 12:00 p.m.
I could not find the answer in the related post:

IScmService

I have a deliver plugin that will launch a script and pass it parameters.. just like a git/svm commit hook.

see the last post here
https://jazz.net/forum/questions/132739/jenkins-polling-is-too-slow-can-rtc-notify-jenkins-immediately

note the post before this one does RTC build launching, while mine is open to use any tooling.



While reading the methods of IScmService I found no way to fetch the repository based on a IWorkspaceSearchCriteria:

SCMPlatform.getWorkspaceManager(repo).findWorkspaces(criteria, IWorkspaceManager.MAX_QUERY_SIZE , null);

How can I search for a workspace with ScmService?

Comments
sam detweiler commented Jan 22 '16, 12:02 p.m.

Server side SCM Search is in a different serviceĀ  IScmQueryService

the referenced post was describing two solutions already built that do what you are trying to do

Your answer


Register or to post your answer.