Commit 5725be95 authored by Bastian Blank's avatar Bastian Blank

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.
parent ee72dc1b
...@@ -39,7 +39,7 @@ class InstanceConfiguration ...@@ -39,7 +39,7 @@ class InstanceConfiguration
def gitlab_ci def gitlab_ci
Settings.gitlab_ci Settings.gitlab_ci
.to_h .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 }) default: 100.megabytes })
end end
......
---
title: Display maximum artifact size from runtime config
merge_request: 26784
author: Bastian Blank
type: fixed
...@@ -82,6 +82,13 @@ describe InstanceConfiguration do ...@@ -82,6 +82,13 @@ describe InstanceConfiguration do
it 'returns the key artifacts_max_size' do it 'returns the key artifacts_max_size' do
expect(gitlab_ci.keys).to include(:artifacts_max_size) expect(gitlab_ci.keys).to include(:artifacts_max_size)
end 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 end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment