diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-02-14 22:54:46 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-02-15 15:31:51 +0800 |
commit | 53c94f9ea25c9d6a25b58a01db5f855f0719dbf4 (patch) | |
tree | 821e1b9aabf4d9602002f551e25c8cc50d252463 /lib/ci | |
parent | ac872078486145f43e8a42dbd60ed47be70a301f (diff) | |
download | gitlab-ce-53c94f9ea25c9d6a25b58a01db5f855f0719dbf4.tar.gz |
Use the same syntax for default expiration
Feedback:
* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23343951
* https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/9219#note_23344036
* https://gitlab.com/gitlab-org/gitlab-ce/issues/27762#note_23344797
Diffstat (limited to 'lib/ci')
-rw-r--r-- | lib/ci/api/builds.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ci/api/builds.rb b/lib/ci/api/builds.rb index 7aad6c50b7b..2018191c4bd 100644 --- a/lib/ci/api/builds.rb +++ b/lib/ci/api/builds.rb @@ -167,7 +167,10 @@ module Ci build.artifacts_file = artifacts build.artifacts_metadata = metadata - build.set_artifacts_expire_in(params['expire_in']) + build.artifacts_expire_in = + params['expire_in'] || + Gitlab::CurrentSettings.current_application_settings + .default_artifacts_expire_in if build.save present(build, with: Entities::BuildDetails) |