TeamCity, Git Agent Checkout does not pull new tags?

Answered

Hallo

we use the VCS labelling feature to add a Git Tag for a release build. The repository contains a set of tests (selenium ui tests) that are used to run to verify a deployment.

So what we had in mind was: 

  1. checkout the git repo
  2. check what version is deployed on an environment
  3. switch to the tag with that version
  4. execute the tests

step 1 and 2 work. We have trouble with step 3. On initial clone the existing tags appear. But after that any new tag is not visible anymore in the build.

We have added "+:refs/tags/*" in the branch specification and enabled the option "Enable to use tags in the branch specification" but that does not help. That only allows to select the tag in the "run..." menu manually. And actually we don't want a new tag to be build - just to be able to switch to a tag after git clone or git fetch.

But for some reason the fetch only updates the master branch, not new tags.

Is there some option hidden somewhere to tell the TeamCity agent to fetch everything not only the master (or default) branch?

Thanks!

0
3 comments
Avatar
Permanently deleted user

well I might found the cause of this.

According to https://confluence.jetbrains.com/display/TCD10/Git when using agent checkout there is a "use mirrors" in the agents settings.

After I disabled "use mirrors" in the VCS root settings any new tags are available in the build (I also left "use tags as branches" enabled but left the branch specification empty).

That was a bit unexpected but it seems to work now :)

0

Hello Werner,

We have the related request in our tracker: https://youtrack.jetbrains.com/issue/TW-24878. It was implemented in TeamCity 10.0.4 version and also can be installed as plugin, see the comment.

1
Avatar
Permanently deleted user

Thanks for the pointer! Good to know to clearer Options with 10.0.4 :-)

0

Please sign in to leave a comment.