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 ?

有帮助吗?

解决方案

Try teamcity.build.triggeredBy.username

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top