summaryrefslogtreecommitdiff
path: root/lib/ci
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-02-14 22:54:46 +0800
committerLin Jen-Shin <godfat@godfat.org>2017-02-15 15:31:51 +0800
commit53c94f9ea25c9d6a25b58a01db5f855f0719dbf4 (patch)
tree821e1b9aabf4d9602002f551e25c8cc50d252463 /lib/ci
parentac872078486145f43e8a42dbd60ed47be70a301f (diff)
downloadgitlab-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.rb5
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)