I am trying to get the userid of the user that has triggered the build and use it as a parameter some where in the build file. Just like we can use ${CCNetProject} to get the project name. Is there a way I can get this information in Cruise Control .Net?
+1
A:
You can access the user via environment variable CCNetUser
. Find more information here.
The Chairman
2010-10-26 07:58:42
You're right. It's also worth to notice that the CCNetUser is not always set : http://stackoverflow.com/questions/3880984/cruisecontrol-net-ccnetuser-property-empty/3881324#3881324
Benjamin Baumann
2010-10-26 08:23:49
This property returns the name of the user i.e John Doe. I want the userid (windows account id) example: doej, userid that was used to login to ccnet. Thanks.
Thinker
2010-10-26 16:20:51
Once you have the user you might use a directory service command line tool like e.g. dsquery (which comes with Windows Server 2003) in your build script. Find more information here: http://support.microsoft.com/kb/322684/EN-US/
The Chairman
2010-10-27 06:16:05