5

I am running TeamCity 9x and it seems that it does not support a VCS password parameter, meaning I have to either use SSH keys (proving difficult, but that's a separate issue) or enter the password for every build config which is unacceptable as we will eventually have well over 100 build config so changing the password would be too arduous.

Is there a way that I can specify the password once and inject that into each VCS root?

Myles McDonnell
  • 12,943
  • 17
  • 66
  • 116
  • What VCS are you using? – sferencik Dec 10 '15 at 13:22
  • Git -> on internally hosted GitLab – Myles McDonnell Dec 10 '15 at 13:39
  • 1
    I think you may have to use SSH. Perforce, for example, has an alternative mechanism (p4tickets) but I don't think there's a git equivalent. – sferencik Dec 10 '15 at 13:53
  • 1
    I feel your pain. Got pretty much everything parametrized in my VCS config but the passwd field refuses take something like `%my_pass%`. Kinda contradicting that TeamCity allows you to create `%my_pass%` as a typed parameter of type `password` but then doesn't let you use it in field that expects a passwd. In my case I wanted to have the passwd value parametrized, so other projects can inherit from a "master template" where this parametrized VCS root belongs to and then easily override repo location along with git user and pass in the Parameters page (no need to mess with VCS root page again) – donhector Apr 30 '16 at 05:00

1 Answers1

6

Kind of workaround solution, but still.

You could try parameterizing other VCS Root details instead!

Create one VCS root, provide username/password for it, parametrize whatever you want with standard Teamcity parameters. Then there are few possible ways of using parameters:

  • Provide parameters for every build as default values;
  • Ask for parameter value on build run (for manual builds);
  • Provide several build templates with parameters preset.

For example, on my current project we are using Git VCS Root with branch name parametrized. All builds with this VCS root are either have branch name set in their default parameters or use value provided from run menu.

arghtype
  • 4,376
  • 11
  • 45
  • 60
  • This is what we do. Unless you are planning to have 100 passwords, this is the right approach. But in my experience the build server will have one account to access VCS so you can just create a single, templated VCS root – Jack Ukleja Dec 15 '15 at 14:20