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
7168493e
Commit
7168493e
authored
May 04, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove container registry on project removal
parent
d85b8896
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletion
+10
-1
app/services/projects/destroy_service.rb
app/services/projects/destroy_service.rb
+8
-0
lib/image_registry/repository.rb
lib/image_registry/repository.rb
+2
-1
No files found.
app/services/projects/destroy_service.rb
View file @
7168493e
...
...
@@ -28,6 +28,10 @@ module Projects
Project
.
transaction
do
project
.
destroy!
unless
remove_registry_tags
raise_error
(
'Failed to remove project image registry. Please try again or contact administrator'
)
end
unless
remove_repository
(
repo_path
)
raise_error
(
'Failed to remove project repository. Please try again or contact administrator'
)
end
...
...
@@ -61,6 +65,10 @@ module Projects
end
end
def
remove_registry_tags
project
.
image_registry
.
delete_tags
end
def
raise_error
(
message
)
raise
DestroyError
.
new
(
message
)
end
...
...
lib/image_registry/repository.rb
View file @
7168493e
...
...
@@ -31,7 +31,8 @@ module ImageRegistry
end
end
def
delete
def
delete_tags
return
unless
tags
tags
.
each
(
:delete
)
end
end
...
...
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