Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f4c9a981
Commit
f4c9a981
authored
Sep 30, 2021
by
Steve Abrams
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix dependency proxy image prefix
Changelog: fixed
parent
72148118
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
app/models/group.rb
app/models/group.rb
+1
-1
spec/models/group_spec.rb
spec/models/group_spec.rb
+4
-0
No files found.
app/models/group.rb
View file @
f4c9a981
...
@@ -276,7 +276,7 @@ class Group < Namespace
...
@@ -276,7 +276,7 @@ class Group < Namespace
def
dependency_proxy_image_prefix
def
dependency_proxy_image_prefix
# The namespace path can include uppercase letters, which
# The namespace path can include uppercase letters, which
# Docker doesn't allow. The proxy expects it to be downcased.
# Docker doesn't allow. The proxy expects it to be downcased.
url
=
"
#{
web_url
.
downcase
}#{
DependencyProxy
::
URL_SUFFIX
}
"
url
=
"
#{
Gitlab
::
Routing
.
url_helpers
.
group_url
(
self
)
.
downcase
}#{
DependencyProxy
::
URL_SUFFIX
}
"
# Docker images do not include the protocol
# Docker images do not include the protocol
url
.
partition
(
'//'
).
last
url
.
partition
(
'//'
).
last
...
...
spec/models/group_spec.rb
View file @
f4c9a981
...
@@ -2756,6 +2756,10 @@ RSpec.describe Group do
...
@@ -2756,6 +2756,10 @@ RSpec.describe Group do
it
'removes the protocol'
do
it
'removes the protocol'
do
expect
(
group
.
dependency_proxy_image_prefix
).
not_to
include
(
'http'
)
expect
(
group
.
dependency_proxy_image_prefix
).
not_to
include
(
'http'
)
end
end
it
'does not include /groups'
do
expect
(
group
.
dependency_proxy_image_prefix
).
not_to
include
(
'/groups'
)
end
end
end
describe
'#dependency_proxy_image_ttl_policy'
do
describe
'#dependency_proxy_image_ttl_policy'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment