summaryrefslogtreecommitdiff
path: root/lib/api/v3/entities.rb
diff options
context:
space:
mode:
authorZ.J. van de Weg <git@zjvandeweg.nl>2017-02-22 11:13:59 +0100
committerZ.J. van de Weg <git@zjvandeweg.nl>2017-02-22 11:55:21 +0100
commit47a3d8b121b83c1993c4f54bc225859d77cf860b (patch)
treea9feae8aa9f45b7e84426f89e071d34a9080aa46 /lib/api/v3/entities.rb
parenta1f05001e8e26d8bfe12b1ae7a8dbd35e050f5b6 (diff)
downloadgitlab-ce-zj-move-build-traces.tar.gz
Rename Builds to Jobs in the APIzj-move-build-traces
Fixes gitlab-org/gitlab-ce#28515 [ci skip]
Diffstat (limited to 'lib/api/v3/entities.rb')
-rw-r--r--lib/api/v3/entities.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/api/v3/entities.rb b/lib/api/v3/entities.rb
index 3cc0dc968a8..7daa653905a 100644
--- a/lib/api/v3/entities.rb
+++ b/lib/api/v3/entities.rb
@@ -11,6 +11,16 @@ module API
Gitlab::UrlBuilder.build(snippet)
end
end
+
+ class Build < Grape::Entity
+ expose :id, :status, :stage, :name, :ref, :tag, :coverage
+ expose :created_at, :started_at, :finished_at
+ expose :user, with: ::API::Entities::User
+ expose :artifacts_file, using: ::API::Entities::JobArtifactFile, if: -> (build, opts) { build.artifacts? }
+ expose :commit, with: ::API::Entities::RepoCommit
+ expose :runner, with: ::API::Entities::Runner
+ expose :pipeline, with: ::API::Entities::PipelineBasic
+ end
end
end
end