0

We have migrated from SVN recently.

We are using Git Stash for source control and Team City for continuous integration, we are also using source tree with Git flow. We are using MSBuild to build TeamCity.

Is there any way I can apply annotated tag (Tag similar to SVN and not lightweight tag available in Git) to my release build on as part of TeamCity CI.

Rajnikant
  • 2,176
  • 24
  • 23

1 Answers1

0

I managed to resolve myself by adding build step with git commands. Below are the changes I had to do in my TeamCity Configuration.

  1. Changed VCS checkout mode: to Automatically on agent (if supported by VCS roots) in version control settings, original value was Automatically on server.
  2. Added Build step and set Choose Runner Type : Command Line, Step Name: "any of your choice, I used Apply Tag", Run : Custom Script, Custom script: *

git -c diff.mnemonicprefix=false -c core.quotepath=false tag -a -m comment tag1

git -c diff.mnemonicprefix=false -c core.quotepath=false push -v origin refs/tags/tag1

And last thing is add permission for the build agent account on your stash repository, otherwise I was getting permission error.

Rajnikant
  • 2,176
  • 24
  • 23