Открыть боковую панель
nt_test134
nt_project_qgddddf2ot8w
Коммиты
6e58e7ff
Коммит
6e58e7ff
создал
Июн 01, 2016
по автору
Kamil Trzcinski
Просмотр файлов
Use downcased path to container repository as this is expected path by Docker
владелец
5a377d20
Изменения
3
Скрыть пробелы
Построчно
Рядом
CHANGELOG
Просмотр файла @
6e58e7ff
...
@@ -21,6 +21,7 @@ v 8.9.0 (unreleased)
...
@@ -21,6 +21,7 @@ v 8.9.0 (unreleased)
- Fix bug when sorting issues by milestone due date and filtering by two or more labels
- Fix bug when sorting issues by milestone due date and filtering by two or more labels
- Remove 'main language' feature
- Remove 'main language' feature
- Pipelines can be canceled only when there are running builds
- Pipelines can be canceled only when there are running builds
- Use downcased path to container repository as this is expected path by Docker
- Projects pending deletion will render a 404 page
- Projects pending deletion will render a 404 page
- Measure queue duration between gitlab-workhorse and Rails
- Measure queue duration between gitlab-workhorse and Rails
- Make authentication service for Container Registry to be compatible with < Docker 1.11
- Make authentication service for Container Registry to be compatible with < Docker 1.11
...
...
app/models/project.rb
Просмотр файла @
6e58e7ff
...
@@ -313,17 +313,17 @@ def container_registry_repository
...
@@ -313,17 +313,17 @@ def container_registry_repository
return
unless
Gitlab
.
config
.
registry
.
enabled
return
unless
Gitlab
.
config
.
registry
.
enabled
@container_registry_repository
||=
begin
@container_registry_repository
||=
begin
token
=
Auth
::
ContainerRegistryAuthenticationService
.
full_access_token
(
path_with_namespace
)
token
=
Auth
::
ContainerRegistryAuthenticationService
.
full_access_token
(
path_with_namespace
.
downcase
)
url
=
Gitlab
.
config
.
registry
.
api_url
url
=
Gitlab
.
config
.
registry
.
api_url
host_port
=
Gitlab
.
config
.
registry
.
host_port
host_port
=
Gitlab
.
config
.
registry
.
host_port
registry
=
ContainerRegistry
::
Registry
.
new
(
url
,
token:
token
,
path:
host_port
)
registry
=
ContainerRegistry
::
Registry
.
new
(
url
,
token:
token
,
path:
host_port
)
registry
.
repository
(
path_with_namespace
)
registry
.
repository
(
path_with_namespace
.
downcase
)
end
end
end
end
def
container_registry_repository_url
def
container_registry_repository_url
if
Gitlab
.
config
.
registry
.
enabled
if
Gitlab
.
config
.
registry
.
enabled
"
#{
Gitlab
.
config
.
registry
.
host_port
}
/
#{
path_with_namespace
}
"
"
#{
Gitlab
.
config
.
registry
.
host_port
}
/
#{
path_with_namespace
.
downcase
}
"
end
end
end
end
...
...
spec/models/project_spec.rb
Просмотр файла @
6e58e7ff
...
@@ -792,6 +792,13 @@
...
@@ -792,6 +792,13 @@
subject
{
project
.
container_registry_repository
}
subject
{
project
.
container_registry_repository
}
it
{
is_expected
.
not_to
be_nil
}
it
{
is_expected
.
not_to
be_nil
}
context
'for uppercase project path'
do
let
(
:project
)
{
create
(
:empty_project
,
path:
'PROJECT'
)
}
it
{
expect
(
subject
.
path
).
not_to
end_with
(
project
.
path
)
}
it
{
expect
(
subject
.
path
).
to
end_with
(
project
.
path
.
downcase
)
}
end
end
end
describe
'#container_registry_repository_url'
do
describe
'#container_registry_repository_url'
do
...
@@ -810,6 +817,13 @@
...
@@ -810,6 +817,13 @@
end
end
it
{
is_expected
.
not_to
be_nil
}
it
{
is_expected
.
not_to
be_nil
}
context
'for uppercase project path'
do
let
(
:project
)
{
create
(
:empty_project
,
path:
'PROJECT'
)
}
it
{
is_expected
.
not_to
end_with
(
project
.
path
)
}
it
{
is_expected
.
to
end_with
(
project
.
path
.
downcase
)
}
end
end
end
context
'for disabled registry'
do
context
'for disabled registry'
do
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать