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
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-09-20 02:18:09 +0300
commit6ed4ec3e0b1340f96b7c043ef51d1b33bbe85fde (patch)
treedc4d20fe6064752c0bd323187252c77e0a89144b /lib/gitlab/seeder.rb
parent9868dae7fc0655bd7ce4a6887d4e6d487690eeed (diff)
Add latest changes from gitlab-org/gitlab@15-4-stable-eev15.4.0-rc42
Diffstat (limited to 'lib/gitlab/seeder.rb')
-rw-r--r--lib/gitlab/seeder.rb42
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/gitlab/seeder.rb b/lib/gitlab/seeder.rb
index 2450ad88bbb..ec514adafc8 100644
--- a/lib/gitlab/seeder.rb
+++ b/lib/gitlab/seeder.rb
@@ -151,48 +151,6 @@ module Gitlab
model.logger = old_loggers[connection_name]
end
end
-
- module Ci
- class DailyBuildGroupReportResult
- DEFAULT_BRANCH = 'master'
- COUNT_OF_DAYS = 5
-
- def initialize(project)
- @project = project
- @last_pipeline = project.last_pipeline
- end
-
- def seed
- COUNT_OF_DAYS.times do |count|
- date = Time.now.utc - count.day
- create_report(date)
- end
- end
-
- private
-
- attr_reader :project, :last_pipeline
-
- def create_report(date)
- last_pipeline.builds.uniq(&:group_name).each do |build|
- ::Ci::DailyBuildGroupReportResult.create(
- project: project,
- last_pipeline: last_pipeline,
- date: date,
- ref_path: last_pipeline.source_ref_path,
- group_name: build.group_name,
- data: {
- 'coverage' => rand(20..99)
- },
- group: project.group,
- default_branch: last_pipeline.default_branch?
- )
- rescue ActiveRecord::RecordNotUnique
- return false
- end
- end
- end
- end
end
end
# :nocov: