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/build.rb')
-rw-r--r--app/models/ci/build.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 3dadb95443a..c9091c19705 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -522,6 +522,13 @@ module Ci
self.job_artifacts.update_all(expire_at: nil)
end
+ def artifacts_file_for_type(type)
+ file = job_artifacts.find_by(file_type: Ci::JobArtifact.file_types[type])&.file
+ # TODO: to be removed once legacy artifacts is removed
+ file ||= legacy_artifacts_file if type == :archive
+ file
+ end
+
def coverage_regex
super || project.try(:build_coverage_regex)
end