0

I'd like to check in assemblies to TFS source control after successful project build on TeamCity. Are there any elegant and easy way to do that?

I can create a command line step and run tf.exe with parameters, but then I need to provide credentials to connect to TFS, map the directories and finally do the check in.

The second option is to set up the powershell step, and use one of the cmdlets, but this requires installation of cmdlets on the build machine which I don't want to do.

Have you got any experience in such case? Maybe I can use the credentials used by TeamCity to get the sources, and do not map the directories but use the downloaded structure / sources?

Steve Macculan
  • 2,292
  • 5
  • 22
  • 32
  • Why dont you just store your artifacts in teamcity/ivy/nuget? – James Woolfenden Apr 08 '14 at 20:50
  • That's good point, nuget is the next step. For now I have a directory which containing assemblies used by several other projects, and the whole thing is to update those assemblies in lib directory. Of course in the future I will try to use nuget instead. – Steve Macculan Apr 08 '14 at 20:53
  • 1
    Until then use teamcity build artifacts to pass your build assemblies around.No powershell or anything much required. – James Woolfenden Apr 08 '14 at 21:18
  • possible duplicate of [Can you configure TeamCity "Artifacts" to be checked back into source control?](http://stackoverflow.com/questions/676132/can-you-configure-teamcity-artifacts-to-be-checked-back-into-source-control) – Mehran Apr 09 '14 at 20:35

2 Answers2

1

This answers your question but it is not normally a good idea to commit binaries to your source control. You have a couple of choices.

  1. Create a nuget package manually:Nuget Packages can be stored in a shared folder. You can manually create a package in 5 minutes.
  2. If your other projects are built using teamcity, check out artifact dependencies in teamcity.
Community
  • 1
  • 1
Mehran
  • 1,977
  • 1
  • 18
  • 33
0

TF.exe commandline tool is the best feasible option for this scenario.

Jehan33
  • 3,780
  • 2
  • 21
  • 16