It's all about the answers!

Ask a question

Getting the workspace name from the workspaceUUID


Scott Crouch (48532426) | asked Feb 25 '11, 8:33 p.m.
As a part of a build script I'm looking for a way to derive the workspace repository name from the workspaceUUID.

I found a reference to enhancement 103635 which mentioned the possibility of using scm.exe to get a listing of workspace names and then grepping out based on the UUID. However, this doesn't seem to work for a personal build as the personal repository is owned by a different user than the build service account. And the scm.exe listing seems to only show the workspaces owned by that service account.

To give some background on why I would want to do this. Our existing system uses the name of the code branch to essentially signify a set of releasable code in the drop location. I'm doing some analysis to see if we could have both the existing system and a new system in RTC following the same general pattern and working off the same drop location. I'd rather not force the user to select the workspace to build and specify the name of the workspace as a separate property of the build.

I'd also be open to the idea of getting the userId of the requester if it's a personal build and I could derive an appropriate branch name from that. Does anybody know a way to do that?

4 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered Feb 26 '11, 1:08 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
There might be a simple way to solve this, but I didn't quite follow
your background ... perhaps an example or two might help?

Cheers,
Geoff

On 2/25/2011 8:38 PM, sac625 wrote:
As a part of a build script I'm looking for a way to derive the
workspace repository name from the workspaceUUID.

I found a reference to
enhancement
103635 which mentioned the possibility of using scm.exe to get a
listing of workspace names and then grepping out based on the UUID.
However, this doesn't seem to work for a personal build as the
personal repository is owned by a different user than the build
service account. And the scm.exe listing seems to only show the
workspaces owned by that service account.

To give some background on why I would want to do this. Our existing
system uses the name of the code branch to essentially signify a set
of releasable code in the drop location. I'm doing some analysis to
see if we could have both the existing system and a new system in RTC
following the same general pattern and working off the same drop
location. I'd rather not force the user to select the workspace to
build and specify the name of the workspace as a separate property of
the build.

I'd also be open to the idea of getting the userId of the requester if
it's a personal build and I could derive an appropriate branch name
from that. Does anybody know a way to do that?

permanent link
Scott Crouch (48532426) | answered Feb 26 '11, 10:56 a.m.
All releases to production occur on a set schedule and many different applications across the company "join the release" by moving their releasable code into a branch representing that release for their application group (usually contains a dozen or so applications maintained by the same teams). The confusing part may be that it's important to point out that there is a separate release branch for each application group. The common enterprise build script then checks out the code from the release branchs, compiles the code for that application group and then drops it in a central location where all the binaries from the individual applications are kept for a given release.

How I would suspect this would be setup in RTC is a project area for each application group, each project area would have their release streams and their feature streams. It's very likely that a stream with the same name would exist in many project areas.

Using made up names, the Call Center Project Area may have FeatureStream1, FeatureSteam2, and March12ReleaseStream. The Infrastructure Project Area may have FeatureStream2 (building infrastructure pieces of code to support the Call Center feature), and a March12ReleaseStream. Each stream would have a build workspace associated to it with a naming standard relative to the stream it's building.

Understandably the user will have to select the specific workspaceUUID they want built because of the conflict across project areas. For the feature and release streams it would be possible to use the scm.exe list/grep hack to get the name of the workspace. However we'd like to be able to support personal builds that follow the same process and would need a way to determine what to call the personal build workspace name on the drop location.

No clue if this makes sense :)

There might be a simple way to solve this, but I didn't quite follow
your background ... perhaps an example or two might help?

Cheers,
Geoff

On 2/25/2011 8:38 PM, sac625 wrote:
As a part of a build script I'm looking for a way to derive the
workspace repository name from the workspaceUUID.

I found a reference to
enhancement
103635 which mentioned the possibility of using scm.exe to get a
listing of workspace names and then grepping out based on the UUID.
However, this doesn't seem to work for a personal build as the
personal repository is owned by a different user than the build
service account. And the scm.exe listing seems to only show the
workspaces owned by that service account.

To give some background on why I would want to do this. Our existing
system uses the name of the code branch to essentially signify a set
of releasable code in the drop location. I'm doing some analysis to
see if we could have both the existing system and a new system in RTC
following the same general pattern and working off the same drop
location. I'd rather not force the user to select the workspace to
build and specify the name of the workspace as a separate property of
the build.

I'd also be open to the idea of getting the userId of the requester if
it's a personal build and I could derive an appropriate branch name
from that. Does anybody know a way to do that?

permanent link
Scott Crouch (48532426) | answered Feb 27 '11, 1:56 p.m.
I ended up writing a custom ant task that uses the SDK to figure this out. I was just hoping there was a straightforward way to do this.

Thanks.

permanent link
Jerel Mohammed (6) | answered Aug 06 '14, 10:33 a.m.
Scott, can you post your solution as to how you did this? Thanks.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.