Skip to content
Snippets Groups Projects
Commit 929fae37 authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Merge branch '2640-rails-object-store' into 'master'

Fix over-nesting of artifacts object store settings

Closes #2640

See merge request !1816
parents 19a72ffd 49108039
No related branches found
No related tags found
1 merge request!1816Fix over-nesting of artifacts object store settings
Loading
Loading
@@ -142,9 +142,9 @@ external_url 'GENERATED_EXTERNAL_URL'
### Job Artifacts
# gitlab_rails['artifacts_enabled'] = true
# gitlab_rails['artifacts_path'] = "/mnt/storage/artifacts"
# gitlab_rails['artifacts']['object_store_enabled'] = false
# gitlab_rails['artifacts']['object_store_remote_directory'] = "artifacts"
# gitlab_rails['artifacts']['object_store_connection'] = {
# gitlab_rails['artifacts_object_store_enabled'] = false
# gitlab_rails['artifacts_object_store_remote_directory'] = "artifacts"
# gitlab_rails['artifacts_object_store_connection'] = {
# 'provider' => 'AWS',
# 'region' => 'eu-west-1',
# 'aws_access_key_id' => 'AWS_ACCESS_KEY_ID',
Loading
Loading
Loading
Loading
@@ -128,9 +128,9 @@ default['gitlab']['gitlab-rails']['incoming_email_mailbox_name'] = "inbox"
default['gitlab']['gitlab-rails']['incoming_email_idle_timeout'] = nil
default['gitlab']['gitlab-rails']['artifacts_enabled'] = true
default['gitlab']['gitlab-rails']['artifacts_path'] = nil
default['gitlab']['gitlab-rails']['artifacts']['object_store_enabled'] = false
default['gitlab']['gitlab-rails']['artifacts']['object_store_remote_directory'] = 'artifacts'
default['gitlab']['gitlab-rails']['artifacts']['object_store_connection'] = {}
default['gitlab']['gitlab-rails']['artifacts_object_store_enabled'] = false
default['gitlab']['gitlab-rails']['artifacts_object_store_remote_directory'] = 'artifacts'
default['gitlab']['gitlab-rails']['artifacts_object_store_connection'] = {}
default['gitlab']['gitlab-rails']['lfs_enabled'] = nil
default['gitlab']['gitlab-rails']['lfs_storage_path'] = nil
default['gitlab']['gitlab-rails']['ldap_enabled'] = false
Loading
Loading
Loading
Loading
@@ -124,9 +124,9 @@ production: &base
# The location where Build Artifacts are stored (default: shared/artifacts).
path: <%= @artifacts_path %>
object_store:
enabled: <%= @artifacts['object_store_enabled'] %>
remote_directory: <%= single_quote(@artifacts['object_store_remote_directory']) %>
connection: <%= @artifacts['object_store_connection'].to_json %>
enabled: <%= @artifacts_object_store_enabled %>
remote_directory: <%= single_quote(@artifacts_object_store_remote_directory) %>
connection: <%= @artifacts_object_store_connection.to_json %>
 
## Git LFS
lfs:
Loading
Loading
Loading
Loading
@@ -151,16 +151,22 @@ describe 'gitlab::gitlab-rails' do
}
JSON
 
stub_gitlab_rb(gitlab_rails: { artifacts: {
object_store_enabled: true,
object_store_remote_directory: 'mepmep',
object_store_connection: json
} })
stub_gitlab_rb(gitlab_rails: {
artifacts_object_store_enabled: true,
artifacts_object_store_remote_directory: 'mepmep',
artifacts_object_store_connection: json
})
 
expect(chef_run).to render_file(gitlab_yml_path)
.with_content(/object_store:\s+enabled: true\s+remote_directory:\s+'mepmep'/)
expect(chef_run).to render_file(gitlab_yml_path)
.with_content(/connection:\s"{\\n 'provider' => 'AWS'/)
expect(chef_run).to render_file(gitlab_yml_path)
.with_content(/'region' => 'eu-west-1'/)
expect(chef_run).to render_file(gitlab_yml_path)
.with_content(/'aws_access_key_id' => 'AKIAKIAKI'/)
expect(chef_run).to render_file(gitlab_yml_path)
.with_content(/'aws_secret_access_key' => 'secret123'/)
end
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment