Commit 0aab667b authored by Anton Smith's avatar Anton Smith Committed by Suzanne Selhorn

Support multiple container repos on manual cleanup

parent 8ca6b163
......@@ -750,11 +750,15 @@ U = <user_id>
# Get required details / objects
user = User.find_by_id(U)
project = Project.find_by_id(P)
repo = ContainerRepository.find_by(project_id: P)
policy = ContainerExpirationPolicy.find_by(project_id: P)
# Start the tag cleanup
Projects::ContainerRepository::CleanupTagsService.new(project, user, policy.attributes.except("created_at", "updated_at")).execute(repo)
# Loop through each container repository
project.container_repositories.find_each do |repo|
puts repo.attributes
# Start the tag cleanup
puts Projects::ContainerRepository::CleanupTagsService.new(project, user, policy.attributes.except("created_at", "updated_at")).execute(repo)
end
```
NOTE: **Note:**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment