Commit 5ffae25a authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Add packages to config files [ci skip]

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent de2f836b
......@@ -2,5 +2,7 @@ class Packages::PackageFileUploader < GitlabUploader
extend Workhorse::UploadPath
include ObjectStorage::Concern
storage_options Gitlab.config.packages
# TODO: Implement me
end
......@@ -207,6 +207,26 @@ production: &base
# endpoint: 'http://127.0.0.1:9000' # default: nil
# path_style: true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
## Packages (maven repository so far)
packages:
enabled: true
# The location where build packages are stored (default: shared/packages).
# storage_path: shared/packages
object_store:
enabled: false
remote_directory: packages # The bucket name
# direct_upload: false # Use Object Storage directly for uploads instead of background uploads if enabled (Default: false)
# background_upload: false # Temporary option to limit automatic upload (Default: true)
# proxy_download: false # Passthrough all downloads via GitLab instead of using Redirects to Object Storage
connection:
provider: AWS
aws_access_key_id: AWS_ACCESS_KEY_ID
aws_secret_access_key: AWS_SECRET_ACCESS_KEY
region: us-east-1
# host: 'localhost' # default: s3.amazonaws.com
# endpoint: 'http://127.0.0.1:9000' # default: nil
# path_style: true # Use 'host/bucket_name/object' instead of 'bucket_name.host/object'
## GitLab Pages
pages:
enabled: false
......
......@@ -252,6 +252,24 @@ Settings.uploads['base_dir'] = Settings.uploads['base_dir'] || 'uploads/-/system
Settings.uploads['object_store'] = ObjectStoreSettings.parse(Settings.uploads['object_store'])
Settings.uploads['object_store']['remote_directory'] ||= 'uploads'
#
# Packages
#
Settings['packages'] ||= Settingslogic.new({})
Settings.packages['enabled'] = true if Settings.packages['enabled'].nil?
Settings.packages['storage_path'] = Settings.absolute(Settings.packages['storage_path'] || File.join(Settings.shared['path'], "packages"))
# Settings.artifact['path'] is deprecated, use `storage_path` instead
Settings.packages['path'] = Settings.packages['storage_path']
Settings.packages['max_size'] ||= 100 # in megabytes
Settings.packages['object_store'] ||= Settingslogic.new({})
Settings.packages['object_store']['enabled'] = false if Settings.packages['object_store']['enabled'].nil?
Settings.packages['object_store']['remote_directory'] ||= nil
Settings.packages['object_store']['direct_upload'] = false if Settings.packages['object_store']['direct_upload'].nil?
Settings.packages['object_store']['background_upload'] = true if Settings.packages['object_store']['background_upload'].nil?
Settings.packages['object_store']['proxy_download'] = false if Settings.packages['object_store']['proxy_download'].nil?
# Convert upload connection settings to use string keys, to make Fog happy
Settings.packages['object_store']['connection']&.deep_stringify_keys!
#
# Mattermost
#
......
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