3

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.

Peter Wippermann
  • 4,125
  • 5
  • 35
  • 48
Lipu
  • 607
  • 1
  • 5
  • 17

1 Answers1

3

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>
Lipu
  • 607
  • 1
  • 5
  • 17
  • 2
    From the GUI it works to remove the build feature – that is the whole docker support entry, not just the login – and add it back, if you don't have access to the configuration directory. Unfortunately I don't see any way to search for affected projects without that access. – Jan Hudec May 25 '20 at 08:19
  • In my case in the build feature from GUI did not show the registry configuration **PROJECT_EXT_3** so I could not remove it. That's why I had to remove it manually from the configuration. – Lipu May 26 '20 at 09:10
  • That's the same I saw, except it was `PROJECT_EXT_98` in my case. However while I could see the xml in the audit tab, I don't have access to it to modify it. But when I removed the whole *Docker Support* build feature, it forgot the parameters for good, so when I added it back, it didn't add the no longer defined login with it and it started to work. It's easier when you have access to the files as you can grep all the instances, but if you don't, deleting the docker support and adding it back does the job. – Jan Hudec May 26 '20 at 09:29