Teamcity 9.1.5 build config built wrong branch

The project has a git vcs repo.

Default branch is : %PortalDefaultBranch% (which value is 'develop')

Branch spec is:

+:(master)
+:(develop)
+:(release/*)
+:(bugfix/*)
+:(feature/*)
+:(hotfix/*)

Each 'active branch' in repo has its own 'run' button. In my case I clicked the 'run' button under 'refs/heads/master' branch. The build was triggered, but the source code was fetched from develop. 2 minutes later i ran a custom build and changed parameter PortalDefaultBranch to refs/heads/develop and the build went through as planned, and the name of the package was correct.

Can not this 'run' button on each branch be trusted? Do I always have to change the DefaultBranch parameter?

3 comments

Hello,

Please try the following branch spec:

+:refs/heads/(master)
+:refs/heads/(develop)
+:refs/heads/(release/*)
+:refs/heads/(bugfix/*)
+:refs/heads/(feature/*)
+:refs/heads/(hotfix/*)

and also specify %PortalDefaultBranch% as "refs/heads/develop". Please let me know if it helps.

0

thanks for the quick response, but that didn't work. I pushed the 'run' button under 'refs/heads/master' branch, and still it built an 'unstable' package which tells me that it fetches from the wrong branch. (we use gitversion).

maybe it's some kind of cache that I must clear?

0

Hi Martin,

Could you please create a copy of the build configuration and try to start builds (use Actions > Copy configuration...)? Do they start on correct branches?

0

Please sign in to leave a comment.