Merge branch 'instance-configuration-artifact-size' into 'master'
Display maximum artifact size from runtime config See merge request gitlab-org/gitlab-ce!26784
This commit is contained in:
commit
2fa3b9846e
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
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
|
||||||
|
|
Loading…
Reference in New Issue