Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorKamil Trzciński <ayufan@ayufan.eu>2018-07-20 14:48:26 +0300
committerKamil Trzciński <ayufan@ayufan.eu>2018-07-20 14:48:26 +0300
commit3bd8a783e8e91cc863655a46c02f8c3391f2a1a4 (patch)
treea9d449c2498ea867ff7b410ce74e9a913e5c021e /lib
parent8895863cf340a8a6c9a708dc864af77fe48beaaa (diff)
parent80c61639f3a3da4895ec0a50437497dc97b4eb49 (diff)
Merge branch 'zj-remove-refs-cleanup' into 'master'
Remove refs cleanup job See merge request gitlab-org/gitlab-ce!20716
Diffstat (limited to 'lib')
-rw-r--r--lib/tasks/gitlab/cleanup.rake23
1 files changed, 0 insertions, 23 deletions
diff --git a/lib/tasks/gitlab/cleanup.rake b/lib/tasks/gitlab/cleanup.rake
index 52ae1330d7f..5e07b12ee1c 100644
--- a/lib/tasks/gitlab/cleanup.rake
+++ b/lib/tasks/gitlab/cleanup.rake
@@ -104,28 +104,5 @@ namespace :gitlab do
puts "To block these users run this command with BLOCK=true".color(:yellow)
end
end
-
- # This is a rake task which removes faulty refs. These refs where only
- # created in the 8.13.RC cycle, and fixed in the stable builds which were
- # released. So likely this should only be run once on gitlab.com
- # Faulty refs are moved so they are kept around, else some features break.
- desc 'GitLab | Cleanup | Remove faulty deployment refs'
- task move_faulty_deployment_refs: :gitlab_environment do
- projects = Project.where(id: Deployment.select(:project_id).distinct)
-
- projects.find_each do |project|
- rugged = project.repository.rugged
-
- max_iid = project.deployments.maximum(:iid)
-
- rugged.references.each('refs/environments/**/*') do |ref|
- id = ref.name.split('/').last.to_i
- next unless id > max_iid
-
- project.deployments.find(id).create_ref
- project.repository.delete_refs(ref)
- end
- end
- end
end
end