summaryrefslogtreecommitdiff
path: root/app/models/ci/build_report_result.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-29 21:08:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-29 21:08:35 +0000
commitd8b32df644a632b143d6b9967311301a2fc83a6b (patch)
tree130722547715d1f65104529d8a09b1ba123776d6 /app/models/ci/build_report_result.rb
parentb64a8161c9442d82897a341d6bf935dd3e748b06 (diff)
downloadgitlab-ce-d8b32df644a632b143d6b9967311301a2fc83a6b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/ci/build_report_result.rb')
-rw-r--r--app/models/ci/build_report_result.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/models/ci/build_report_result.rb b/app/models/ci/build_report_result.rb
new file mode 100644
index 00000000000..a65ef885b88
--- /dev/null
+++ b/app/models/ci/build_report_result.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module Ci
+ class BuildReportResult < ApplicationRecord
+ extend Gitlab::Ci::Model
+
+ self.primary_key = :build_id
+
+ belongs_to :build, class_name: "Ci::Build", inverse_of: :report_results
+ belongs_to :project, class_name: "Project", inverse_of: :build_report_results
+
+ validates :build, :project, presence: true
+ validates :data, json_schema: { filename: "build_report_result_data" }
+ end
+end