Using Docker connections
Hello.
In my setup I have a common parent project that defines a number of build templates that are used in the sub projects. One of those templates builds and pushs a docker image. The problem is that if I define my Docker connection in the parent, all build configurations/chains in all sub-projects require docker. I only have 2 agents that can run docker builds, which means all the sub projects can only run on 2 of my agents which is a bottleneck. The connection can only be defined on the project level, so I can't associate just one build template with the connection. I know I can define the connection at a lower level in the hierarchy, but then I have to manage the credentials for that one connection across the dozens of sub-projects.
Am I doing something wrong, or do I not understand how the connection is supposed to work?
It seems that If I could get the credentials from a central location (similar to how I can point to an SSH key for a VCS root), it would solve the problem and I could define the connection in multiple places without a maintenance issue.
Thanks, in advance.
Please sign in to leave a comment.
Hi,
Have you considered storing the project settings in version control using DSL and using DSL tokens as parameters in the docker connection? The following documentation might be helpful for this purpose:
https://www.jetbrains.com/help/teamcity/kotlin-dsl.html#Working+with+secure+values+in+DSL