diff options
author | Kamil Trzciński <ayufan@ayufan.eu> | 2018-08-14 22:53:58 +0300 |
---|---|---|
committer | Kamil Trzciński <ayufan@ayufan.eu> | 2018-08-14 22:53:58 +0300 |
commit | 6343964b9c7acac25d946545778c8ae6523773da (patch) | |
tree | 1fa3e8047df38465bbfdf0549452720a10005a3b /lib/api/entities.rb | |
parent | 125809ce03374816bfa9e64066e00f601f6cdb06 (diff) | |
parent | 3a80f030375835f0cfaf105ae6aba7c103f63de5 (diff) |
Merge branch 'expose-all-artifacts-sizes-in-jobs-api' into 'master'
Expose all artifacts sizes in jobs api
See merge request gitlab-org/gitlab-ce!20821
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 453ebb9c669..458ee320099 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -1080,6 +1080,10 @@ module API expose :filename, :size end + class JobArtifact < Grape::Entity + expose :file_type, :size, :filename, :file_format + end + class JobBasic < Grape::Entity expose :id, :status, :stage, :name, :ref, :tag, :coverage expose :created_at, :started_at, :finished_at @@ -1094,7 +1098,9 @@ module API end class Job < JobBasic + # artifacts_file is included in job_artifacts, but kept for backward compatibility (remove in api/v5) expose :artifacts_file, using: JobArtifactFile, if: -> (job, opts) { job.artifacts? } + expose :job_artifacts, as: :artifacts, using: JobArtifact expose :runner, with: Runner expose :artifacts_expire_at end |