diff options
Diffstat (limited to 'app/models/ci/build.rb')
-rw-r--r-- | app/models/ci/build.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index dd315866e60..6ca46ae89c1 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -11,6 +11,7 @@ module Ci has_many :deployments, as: :deployable has_one :last_deployment, -> { order('deployments.id DESC') }, as: :deployable, class_name: 'Deployment' + has_many :trace_sections, class_name: 'Ci::BuildTraceSection' # The "environment" field for builds is a String, and is the unexpanded name def persisted_environment @@ -265,6 +266,10 @@ module Ci update_attributes(coverage: coverage) if coverage.present? end + def parse_trace_sections! + ExtractSectionsFromBuildTraceService.new(project, user).execute(self) + end + def trace Gitlab::Ci::Trace.new(self) end |