Display maximum artifact size from runtime config
The maximum artifact size was moved into runtime config some time ago. Update the instance configuration code to read this value.
This commit is contained in:
parent
ee72dc1b34
commit
5725be9508
3 changed files with 13 additions and 1 deletions
|
@ -39,7 +39,7 @@ class InstanceConfiguration
|
|||
def gitlab_ci
|
||||
Settings.gitlab_ci
|
||||
.to_h
|
||||
.merge(artifacts_max_size: { value: Settings.artifacts.max_size&.megabytes,
|
||||
.merge(artifacts_max_size: { value: Gitlab::CurrentSettings.max_artifacts_size.megabytes,
|
||||
default: 100.megabytes })
|
||||
end
|
||||
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: Display maximum artifact size from runtime config
|
||||
merge_request: 26784
|
||||
author: Bastian Blank
|
||||
type: fixed
|
|
@ -82,6 +82,13 @@ describe InstanceConfiguration do
|
|||
it 'returns the key artifacts_max_size' do
|
||||
expect(gitlab_ci.keys).to include(:artifacts_max_size)
|
||||
end
|
||||
|
||||
it 'returns the key artifacts_max_size with values' do
|
||||
stub_application_setting(max_artifacts_size: 200)
|
||||
|
||||
expect(gitlab_ci[:artifacts_max_size][:default]).to eq(100.megabytes)
|
||||
expect(gitlab_ci[:artifacts_max_size][:value]).to eq(200.megabytes)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue