diff options
| author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-08 22:32:36 +0100 |
|---|---|---|
| committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-02-19 18:30:13 +0100 |
| commit | 921cfb66e617156517761b3f294f58c81db55dea (patch) | |
| tree | 0580e40ca8dcbdb94db6b6b0d460bb4e0443acc6 /lib/api/entities.rb | |
| parent | 96158aa6b377d6f683d560689562293c36e05002 (diff) | |
| download | gitlab-ce-921cfb66e617156517761b3f294f58c81db55dea.tar.gz | |
Introduce API for serving the artifacts archive
Diffstat (limited to 'lib/api/entities.rb')
| -rw-r--r-- | lib/api/entities.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 857705dbf12..eaf42bee113 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -391,6 +391,10 @@ module API end end + class BuildArtifactFile < Grape::Entity + expose :filename, :size + end + class Build < Grape::Entity expose :id, :status, :stage, :name, :ref, :tag, :coverage expose :created_at, :started_at, :finished_at @@ -402,6 +406,7 @@ module API repo_obj.artifacts_download_url end end + expose :artifacts_file, using: BuildArtifactFile, if: lambda { |build, opts| build.artifacts? } expose :commit, with: RepoCommit do |repo_obj, _options| if repo_obj.respond_to?(:commit) repo_obj.commit.commit_data |
