summaryrefslogtreecommitdiff
path: root/app/serializers/build_trace_entity.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 15:06:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 15:06:17 +0000
commit238d22c07218adf2b8f3db630ee8b74ca6f29df5 (patch)
tree23fd5f85efef0fb95eb73bf6395d5b7e8c0f1b9f /app/serializers/build_trace_entity.rb
parent6b75320f525f841454f1ab162d141d3610f2e77b (diff)
downloadgitlab-ce-238d22c07218adf2b8f3db630ee8b74ca6f29df5.tar.gz
Add latest changes from gitlab-org/gitlab@masterlist
Diffstat (limited to 'app/serializers/build_trace_entity.rb')
-rw-r--r--app/serializers/build_trace_entity.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/app/serializers/build_trace_entity.rb b/app/serializers/build_trace_entity.rb
new file mode 100644
index 00000000000..b5bac8a5d64
--- /dev/null
+++ b/app/serializers/build_trace_entity.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class BuildTraceEntity < Grape::Entity
+ expose :build_id, as: :id
+ expose :build_status, as: :status
+ expose :build_complete?, as: :complete
+
+ expose :state
+ expose :append
+ expose :truncated
+ expose :offset
+ expose :size
+ expose :total
+
+ expose :json_lines, as: :lines, if: ->(*) { object.json? }
+ expose :html_lines, as: :html, if: ->(*) { object.html? }
+end