views:

28

answers:

1

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
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
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
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