Skip to content
Snippets Groups Projects

ci: fix $CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX for non-lowercase groups

5 files
+ 13
3
Compare changes
  • Side-by-side
  • Inline
Files
5
  • 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.
+ 3
1
@@ -2026,7 +2026,9 @@ def dependency_proxy_variables
variables.append(key: 'CI_DEPENDENCY_PROXY_SERVER', value: "#{Gitlab.config.gitlab.host}:#{Gitlab.config.gitlab.port}")
variables.append(
key: 'CI_DEPENDENCY_PROXY_GROUP_IMAGE_PREFIX',
value: "#{Gitlab.config.gitlab.host}:#{Gitlab.config.gitlab.port}/#{namespace.root_ancestor.path}#{DependencyProxy::URL_SUFFIX}"
# The namespace path can include uppercase letters, which
# Docker doesn't allow. The proxy expects it to be downcased.
value: "#{Gitlab.config.gitlab.host}:#{Gitlab.config.gitlab.port}/#{namespace.root_ancestor.path.downcase}#{DependencyProxy::URL_SUFFIX}"
)
end
end
Loading