Are there or can you make a build parameter that has the users name (not userid) who initiated the run?

I checked the documentation for predefined parameters and could not see one. But I am wondering if there is a way to add a custom parameter that will always be populated with the logged in users `Name` field?

If not maybe you can help me solve my actual issue which is about authenticating an ssh connection to a linux server but we dont want a service account so I am looking towards each release engineer uploading their key via the ssh agent build feature and then hoping there is some build in parameter that I can leverage so as the ssh connection is done under the logged in user. I do not want a free form parameter as then a person could impersonate any release engineer assuming they know their username and their key is uploaded to that project.

0
1 comment
Hi! The teamcity.build.triggeredBy parameter should give you the name of the user who triggered the build, if it was triggered by a user.
However, please note the user can change their name in their profile settings.
As a side note, you can look up the parameter keys by value if you go to the build results page > Parameters.
1

Please sign in to leave a comment.