TeamCity docker registry " Cannot find the Docker Connection referenced from the Docker build feature"

Viewed 765

I am trying to setup TeamCity 2019.2.2 for my home projects. The configuration works perfectly but at the beginning of every build it prints a error:

 Cannot find the Docker Connection referenced from the Docker build feature, probably it was removed. Please update Docker build feature settings. Build will continue without logging in to Docker Registry

Project configurations

I have created a build template in the Root Project and that is the default configuration for the project. Connection to docker registry is configured also in Root Project. All the build steps and build features are also being configured in the template.

Solution attemps

  1. I have reconfigured docker registry in the template and also reconfigured the build feature in specific projects - with no luck :(

  2. Now I configured all the repository projects to use this configuration. everything works, building docker image and pushing the docker image.

Any help is appreciated.

1 Answers

I am answering my own question as I found the problem and solution. This may help others in future.

What happened: I had configured docker registry connection in project, then created the template. After that I found that I had login problem in old docker registry connection so I removed it and created a new connection. But the template configuration was not able to remove that config. So the template's build feature had 2 different docker registry one of which is non existent.

Solution: There is not straight forward solution. I had the go to the configuration folder of the teamcity server and update the template configuration manually. I just removed the reference of PROJECT_EXT_3 from the following configuration.

<parameters>
      <param name="login2registry" value="PROJECT_EXT_3,PROJECT_EXT_5" />
      <param name="loginCheckbox" value="on" />
</parameters>
Related