Access the users of changelist in MSBUILD

Hi,

I am using msbuild to build our projects. Our projects are present in Perforce. TeamCity triggers on a checkin to perforce. TeamCity is picking up the changes (Chagelists) from perforce and does a build. When build fails it will send emails to the users who are associated with Changelists. I was wondering how TeamCity gets the users associated with the changelists. And after getting users it is somehow translating them to the email addresses associated with it. I was wondering if TeamCity would provide a means for me to access the users associated with changelilsts so that I could use them to do some specialized task with them.

Thansk,

Vijay

6 comments
Comment actions Permalink

Hello,

VCS users are mapped to TeamCity users based on VCS usernames configured on user profile by each user. TeamCIty users then have emails specified.

The information on the correspondence is available via JAVA API for TeamCity plugins.
For an external process the most you can do is to use REST API to get the information entered on user profiles or get a TeamCity user by a TeamCity change.

0
Comment actions Permalink

Cool got you. I was wondering if we could do it via MSBUILD task to access the users associated with a changelist and write to a file.

0
Comment actions Permalink

You can access this data by REST API at http://teamcity/app/rest/changes?build=id:%teamcity.build.id% and follow HREFs there.

0
Comment actions Permalink

Thank you for your reply. I lost track of this. I am trying to access the documentation for Rest Api as mentioned by you in the previous post. The hyperlinks seesm to be not working.

0
Comment actions Permalink

Hi

The link above is just example how required URL should look like. You'll need to adapt it to your environment.
Here is the a link to REST plugin docs: http://confluence.jetbrains.net/display/TW/REST+API+Plugin

0
Comment actions Permalink

Hi Michael, I just figured out that, it is the case. Thank you very much for the reply.

0

Please sign in to leave a comment.