concourse / registry-image-resource

a resource for images in a Docker registry
Apache License 2.0
89 stars 107 forks source link

Suddenly unable to put to private repository. #318

Closed mitchellkingsley closed 2 years ago

mitchellkingsley commented 2 years ago

Hello,

As of 3 days ago (May 2nd 2022) I was successfully puting docker images into a private Azure container registry. This was working for all of the images that I was generating. Since all of the image build processes are git-triggered pipelines, I am ectremely confidant that nothing has changed configuration wise since then.

However, today I added a fairly simple docker image build job, and discovered that my put step after building was failing with the following error:

ERRO[0000] could not resolve repository: repository must be between 2 and 255 runes in length:

I re-ran previously successful pipelines (which have not changed) that also build docker images and push to the same repository as the new pipeline noted above for a sanity check. I then found that all of my build jobs are failing to put the built images.

The nature of the error message makes me think that the repository name is not being read properly from my configuration. The relevant excerpt can be seen here:

  3    - name: example-image
  4      type: registry-image
  5      icon: docker
  6      source:
  7        repository: companynamealllowercase.azurecr.io/
  8        tag: latest
  9        username: ((service-principal-id))
 10        password: ((service-principal-password))

The repository name is between 2 and 255 characters.

Any help would be greatly appreciated, it seems like something in the parsing of repository names has become broken recently.

mitchellkingsley commented 2 years ago

This was my fault. For whatever reson I missed the target image in my repository line

  7        repository: companynamealllowercase.azurecr.io/<image.name>