Teamcity, passing the user who triggered the build to powershell script

1.4k Views Asked by At

I would like to pass my powershell build step script the user who is currently logged in teamcity and triggered the build to run. I have tried to approach it in a different way where a user checks in a file which would contain the users user name but my PM insists that I use teamcity to pass the user. I have tried

%teamcity.auth.userid%  or %System.teamcity.auth.userid%  or %env.username% or 
%teamcity.agent.jvm.user.name%

and none of them are giving me the proper user name. Could someone help please ?

1

There are 1 best solutions below

1
Sam Jones On BEST ANSWER

Try teamcity.build.triggeredBy.username