It's all about the answers!

Ask a question

Permission to change build workspace


Leonardo Marzo (24964852) | asked Aug 14 '14, 11:49 a.m.
edited Aug 14 '14, 11:56 a.m.
 Hi, 

We have a single shared user (builduser) that we use as owner of the workspaces associated to build definitions.
 
The problem is that it is a bit of a pain to maintain the build because only the builduser user can make changes to the build workspace. So, every time a change has to be done to the build workspace, I have to logout and login as builduser. Or I need to have two instances of Eclipse running at the same time. Or, I have to be admin.

I´m trying to find the way to make this less painful. Obviously, I can't grant everyone with Admin privileges. 

It would be great if a Team could be set as the owner of a workspace. 

I tried switching the owner of a workspace using the command line client, but that's don't seem to be possible. 


Any thoughts??? 


Thank you, 

Accepted answer


permanent link
Winston Enos (33116) | answered Aug 14 '14, 1:57 p.m.
edited Aug 14 '14, 1:58 p.m.
Leonardo Marzo,

We actually had a similar issue and we sort of came up with a workable solution for it.

Our situation was that our Jenkins workspaces are owned by a common builder user, but as you said, whenever changes have to be made to the workspace, if the person, or persons, who have the credentials to login as that builder user are gone, then it takes a JazzAdmin to switch the owner (in our environment, only IT has JazzAdmin capabilities.)

So we used the command-line to help get around it a bit, mind you this is RTC 5.0 so you may need to look up the 4.x way of using the CLI if these commands don't exist in your environment:

1. On the build machine where Jenkins runs you create cached login credentials for the builder user so that you can run CLI calls with their permissions: 'scm.exe login --cache --nickname BUILDER_CREDS --username <builder> --repository-uri <RTC_server_url>'. This will create encrypted, locally-cached credentials for the builder user on the machine with a nickname of 'BUILDER_CREDS' so that you can easily use it in other CLI calls. By the way, this data is stored on disk at: C:\Users\<builder>AppData\Local\jazz-scm (or %APPDATA%\Local if you use another OS, this is Win7) so it survives reboots.

2. You can check the owner of a repository via the command line (be aware that the builder user must belong to the RTC Project to have scope to project-scoped workspaces): 'scm.exe --non-interactive --show-uuid y show attributes -r BUILDER_CREDS --workspace <workspace_name/uuid> ' (this is 'workspace propertylist' in the 4.x CLI I believe.)

3. You can re-assign ownership of the workspace by using: 'scm.exe --non-interactive --show-uuid y set attributes -r BUILDER_CREDS --workspace <worksace_name/uuid> --ownedby <user>' to reassign to a specific user.

The way we have this working is we have a parameterized Jenkins build you can start manually, it pings you for a RTC-compliant username, then it will use the above commands to re-assign ownership of a workspace, or range of workspaces by pattern, to the passed-in user in bulk. That way you can assign to you, modify the workspaces, then re-assign back to the builder user.
Leonardo Marzo selected this answer as the correct answer

Comments
Leonardo Marzo commented Aug 15 '14, 9:48 a.m.

Great answer! That's what I was looking for, Thanks Winston 

One other answer



permanent link
Stephanie Bagot (2.1k1513) | answered Aug 14 '14, 12:45 p.m.
FORUM MODERATOR / JAZZ DEVELOPER
I dont think this is available, I would recommend to open up an enhancement request.
That being said, I believe your process is best to ensure changes are only made by one user. Its just a hassle to have to logout/login frequently.

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.