[closed] Is there a way around logging into server when issuing SCM CLI commands from a build context?
@all ,
when calling SCM CLI commands from either a commandline build in RTC or an ANT build (wrapped as ANT tasks) I found no way around actually issuing the >scm login command before anything else. It seems kind of counterintuitive that I would have to do that, given that the build obviously is running in an authorized session already.
Is there any way I could reuse that build session with the server rather than having to login / logout for each (set of) SCM command(s) run during the build?
I already worked through the articles 195 , 978 , 1031 on jazz.net as well as the Build FAQ, doc and samples. What am I missing? Any pointers highly welcome.
- Arne
when calling SCM CLI commands from either a commandline build in RTC or an ANT build (wrapped as ANT tasks) I found no way around actually issuing the >scm login command before anything else. It seems kind of counterintuitive that I would have to do that, given that the build obviously is running in an authorized session already.
Is there any way I could reuse that build session with the server rather than having to login / logout for each (set of) SCM command(s) run during the build?
I already worked through the articles 195 , 978 , 1031 on jazz.net as well as the Build FAQ, doc and samples. What am I missing? Any pointers highly welcome.
- Arne
The question has been closed for the following reason: "The question is answered, right answer was accepted" by abister Feb 27 '14, 12:30 p.m.
Accepted answer
Since scm cli and build are two different apps, each app should authenticate independently. If the credentials is cached then scm cli could use that to login without making an explicit call to login. Would that work?
Comments
Yes, that will work. Got my mind sorted around this. Basically I would have to use a plugin to build which makes direct calls to the API to truly be in the security context of the build app. But using the <exec> task in ANT for now and calling >scm ... -r repo -u user -P password is a feasible way of working.