Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
167296f4
Commit
167296f4
authored
Aug 17, 2017
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix url for object store artifacts
parent
248301a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
11 deletions
+17
-11
changelogs/unreleased-ee/fix-public-url-for-object-store.yml
changelogs/unreleased-ee/fix-public-url-for-object-store.yml
+5
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+2
-2
spec/support/stub_artifacts.rb
spec/support/stub_artifacts.rb
+10
-9
No files found.
changelogs/unreleased-ee/fix-public-url-for-object-store.yml
0 → 100644
View file @
167296f4
---
title
:
Fix url for object store artifacts
merge_request
:
author
:
type
:
fixed
config/initializers/1_settings.rb
View file @
167296f4
...
...
@@ -332,8 +332,8 @@ Settings.artifacts['max_size'] ||= 100 # in megabytes
Settings
.
artifacts
[
'object_store'
]
||=
Settingslogic
.
new
({})
Settings
.
artifacts
[
'object_store'
][
'enabled'
]
=
false
if
Settings
.
artifacts
[
'object_store'
][
'enabled'
].
nil?
Settings
.
artifacts
[
'object_store'
][
'remote_directory'
]
||=
nil
# Convert upload connection settings to use s
ymbol
keys, to make Fog happy
Settings
.
artifacts
[
'object_store'
][
'connection'
]
&
.
deep_s
ymbolize
_keys!
# Convert upload connection settings to use s
tring
keys, to make Fog happy
Settings
.
artifacts
[
'object_store'
][
'connection'
]
&
.
deep_s
tringify
_keys!
#
# Registry
...
...
spec/support/stub_artifacts.rb
View file @
167296f4
module
StubConfiguration
def
stub_artifacts_object_storage
(
enabled:
true
)
Fog
.
mock!
allow
(
Gitlab
.
config
.
artifacts
.
object_store
).
to
receive_messages
(
enabled:
enabled
,
remote_directory:
'artifacts'
,
connection:
{
provider:
'AWS'
,
aws_access_key_id:
'AWS_ACCESS_KEY_ID'
,
aws_secret_access_key:
'AWS_SECRET_ACCESS_KEY'
,
region:
'eu-central-1'
}
object_store
=
Settingslogic
.
new
(
'enabled'
=>
enabled
,
'remote_directory'
=>
'artifacts'
,
'connection'
=>
Settingslogic
.
new
(
'provider'
=>
'AWS'
,
'aws_access_key_id'
=>
'AWS_ACCESS_KEY_ID'
,
'aws_secret_access_key'
=>
'AWS_SECRET_ACCESS_KEY'
,
'region'
=>
'eu-central-1'
)
)
allow
(
Gitlab
.
config
.
artifacts
).
to
receive
(
:object_store
)
{
object_store
}
allow_any_instance_of
(
ArtifactUploader
).
to
receive
(
:verify_license!
)
{
true
}
return
unless
enabled
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment