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:
Diffstat (limited to 'app/models/ci/pipeline.rb')
-rw-r--r--app/models/ci/pipeline.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb
index addc8a7a2fc..94b99835a53 100644
--- a/app/models/ci/pipeline.rb
+++ b/app/models/ci/pipeline.rb
@@ -789,6 +789,12 @@ module Ci
end
end
+ def test_reports_count
+ Rails.cache.fetch(['project', project.id, 'pipeline', id, 'test_reports_count'], force: false) do
+ test_reports.total_count
+ end
+ end
+
def has_exposed_artifacts?
complete? && builds.latest.with_exposed_artifacts.exists?
end