Skip to content

ci: fix $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX for non-lowercase groups

What does this MR do?

$CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX is currently broken for groups containing uppercase letters, as docker does not allow uppercase characters in the image path, but GitLab allows them in the group name, which is used in the dependency proxy's image prefix.

The proxy already works with lowercased group names, the only thing needed is to make sure we pass the correct prefix to the CI and to the web page user.

Screenshots (strongly suggested)

Taking my current employer as an example, our group name is Datapred with an uppercase initial.

before after
image image

Notice the change in the URL shown. The same change is also applied to the $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX CI variable.

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

I haven't done this in this MR (yet), but it would probably be good to add tests using group names containing all the characters allowed by GitLab, to make sure that those are all handled correctly by Docker.

Security

N/A

TODO

  • add tests showing this bug, and that this MR fixes it
  • maybe: mention in the doc that this variable cannot be used in groups containing uppercase letters until GitLab 13.10

Closes #296171 (closed)

Labels: ~"group::package" devopspackage Category:Dependency Proxy ~bug severity3 (as defined by @ddavison in the bug linked above)

/cc PM @trizzi

Edited by Thong Kuah

Merge request reports