jenkins - Windows logon name of the user on whose behalf the code is being run -
i've googled , checked 2 resources.
i have msbuild.exe calling myproject.proj file.
is there way report iidentity of identity running process?
i did not find under "common msbuild project properties" or "jenkins environment variables".
i know write custom task wrap call ( https://msdn.microsoft.com/en-us/library/system.security.principal.windowsidentity.name%28v=vs.100%29.aspx ), i'm hoping there simpler out there.
"common msbuild project properties" : https://msdn.microsoft.com/en-us/library/bb629394.aspx
"jenkins environment variables" : https://wiki.jenkins-ci.org/display/jenkins/building+a+software+project#buildingasoftwareproject-below
you can try running whoami command inside exec task such as:
<exec command="whoami" consoletomsbuild="true"> <output taskparameter="consoleoutput" propertyname="username" /> </exec> <message text="hello $(username), script"/> more command can found here
Comments
Post a Comment