Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rosetta
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ExaCT
Rosetta
Commits
a2ff53d8
Commit
a2ff53d8
authored
3 years ago
by
Stefano Alberto Russo
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix in inferring image tag from image name.
parent
93f363c0
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
services/webapp/code/rosetta/core_app/utils.py
+7
-1
7 additions, 1 deletion
services/webapp/code/rosetta/core_app/utils.py
with
7 additions
and
1 deletion
services/webapp/code/rosetta/core_app/utils.py
+
7
−
1
View file @
a2ff53d8
...
@@ -789,7 +789,13 @@ def get_or_create_container_from_repository(user, repository_url, repository_tag
...
@@ -789,7 +789,13 @@ def get_or_create_container_from_repository(user, repository_url, repository_tag
# Set image registry, name and tag. Use "strip()" as sometimes the newline chars might jump in.
# Set image registry, name and tag. Use "strip()" as sometimes the newline chars might jump in.
registry
=
get_platform_registry
()
registry
=
get_platform_registry
()
image_name
=
repository_name
.
lower
().
strip
()
image_name
=
repository_name
.
lower
().
strip
()
image_tag
=
repo2docker_image_name
[
-
7
:]
# The last part of the image name generated by repo2docker is the git short hash
if
repo2docker_image_name
.
endswith
(
'
:latest
'
):
# Not clear why sometimes this happens. maybe if an existent image gets reused?
image_name_for_tag
=
repo2docker_image_name
.
replace
(
'
:latest
'
,
''
)
else
:
image_name_for_tag
=
repo2docker_image_name
image_tag
=
image_name_for_tag
[
-
7
:]
# The last part of the image name generated by repo2docker is the git short hash
# Re-tag image taking into account that if we are using the proxy as registry we use localhost or it won't work
# Re-tag image taking into account that if we are using the proxy as registry we use localhost or it won't work
if
registry
==
'
proxy:5000
'
:
if
registry
==
'
proxy:5000
'
:
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment