I need to determine the target branch when running tests in teamcity in order to pull the correct artifacts. Tests are run on merge request, but the problem is that it is impossible to determine the target branch from the teamcity environment.
I need to be able to use this in Team City Artifact dependencies. To use the desired branch with artifacts.
I tried using different teamcity variables:
%teamcity.build.branch%
%teamcity.build.vcs.branch.ProjectName_GitGitgitlabComNameGit%
But I only get the merge request number Also i tried using git commands but that didn't help either.
Perhaps someone solved such a problem?