diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2016-06-28 18:14:21 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2016-06-28 18:14:21 +0800 |
commit | fe0c59d2e61238e1241be448a37be0e3e702a5ce (patch) | |
tree | a002bc7887880f291b2294ebce044c3527dc7df4 /lib/ci | |
parent | aa3a3fd12fc7152020ffbe54faa36a4f17eb94b2 (diff) | |
download | gitlab-ce-fe0c59d2e61238e1241be448a37be0e3e702a5ce.tar.gz |
Introduce ci_builds.artifacts_sizes as JSON:
We store the sizes as a hash from path to bytes like:
``` ruby
{'ci_artifacts.txt' => 27,
'other_artifacts_0.1.2/another-subdirectory/banana_sample.gif' =>
71759,
'other_artifacts_0.1.2/doc_sample.txt' => 1314,
'rails_sample.jpg' => 35255,
'tests_encoding/utf8 test dir ✓/regular_file_2' => 7}
```
So that it's easier to access than reading gzip file again.
Diffstat (limited to 'lib/ci')
-rw-r--r-- | lib/ci/api/builds.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb index 9f270f7b387..93eed4496e4 100644 --- a/lib/ci/api/builds.rb +++ b/lib/ci/api/builds.rb @@ -147,6 +147,7 @@ module Ci build.artifacts_file = artifacts build.artifacts_metadata = metadata build.artifacts_expire_in = params['expire_in'] + build.artifacts_sizes = build.artifacts_metadata_sizes if build.save present(build, with: Entities::BuildDetails) |