3

I have in my TeamCity job a VCS trigger that runs automatically once we push changes in our bitbucket repo. that looks like this:

Quiet period: 60 seconds (default)
VCS trigger rules:
-:user=ciuser:**/*
Triggers one build per each VCS check-in (include several check-ins in build if they are from the same committer)

now when checking the %teamcity.build.triggeredBy% parameter Im getting as a result the string "Git" instead of actually the user that pushed those changes.

is there a way to get the username that made the changes instead of getting that git parameter.

I searched here and didn't find any answer and didn't find any relevant question in stack overflow either.

yonBav
  • 1,695
  • 2
  • 17
  • 31

1 Answers1

2

The %teamcity.build.triggeredBy% parameter is not populated with the user that pushed the changes to git - according to the docs, it's simply:

Human-friendly description of how the build was triggered

Thus, the value Git indicates that the build was triggered by the fact that new commits were pushed to the Git repository, which is configured as VCSRoot for this project.

There is no easy way to obtain the information you need. There are a couple of options outlined in this post:

  • use TeamCity REST API
  • use Git command-line tool
Yan Sklyarenko
  • 31,557
  • 24
  • 104
  • 139