Storing configs in git, separate branches for prod/dev/test, and merge conflicts.

Answered

I'm working on a teamcity project. The project config will be created from kotlin code in a git repo. The parent vcs root for the project config is saved on the server. Everything else config related will be saved in the repo. I want three separate branches, one each for prod/test/dev.

My issue is that I have a separate repo for scripts/build job tools. I need to have some way to connect the teamcity jobs to different branches in my scripts repo. If the param or vcs root is stored in the config repo I run into problems with the config having different values when I merge test into prod.

How can I set up three different teamcity projects connected to three different branches in two repos?

I noticed versioned settings isn't stored in the vcs root. Is there anyway to access the branch used for the teamcity config from that vcs root? I can see branch info for other roots in parameters, but not for my versioned setttings vcs root.

1 comment
Comment actions Permalink

Hello!

Versioned settings feature will work with a default branch of corresponding VCS root. Depending on the settings, you may execute the build using the settings from a feature branch, though (please find the details here: https://www.jetbrains.com/help/teamcity/storing-project-settings-in-version-control.html#Defining+Settings+to+Apply+to+Builds, "use current settings by default" / "use settings from VCS" options description). Alternatively, if you need a project to use the settings from the feature branch by default, you may create a copy of VCS root with a feature branch set as default one.


0

Please sign in to leave a comment.