diff options
author | Robert Speicher <robert@gitlab.com> | 2015-11-24 01:19:13 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2015-11-24 01:19:54 +0300 |
commit | 69383ac2667b9d3c4d41422a91ace970b9be6091 (patch) | |
tree | 3655bbe71f13f7588755f3f093cc83ec1dd0e01b /app | |
parent | 320c86abd769e9d057db4786c52f2d52507e933b (diff) |
Merge branch 'ci-artifacts-path' into 'master'
Expose artifacts path
This fixes broken artifacts storage path.
Fixes #3607
Fixes #3608
Related: gitlab-org/omnibus-gitlab!544
See merge request !1869
Diffstat (limited to 'app')
-rw-r--r-- | app/models/application_setting.rb | 2 | ||||
-rw-r--r-- | app/uploaders/artifact_uploader.rb | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 9e70247ef51..b2d5fe1558f 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -99,7 +99,7 @@ class ApplicationSetting < ActiveRecord::Base restricted_signup_domains: Settings.gitlab['restricted_signup_domains'], import_sources: ['github','bitbucket','gitlab','gitorious','google_code','fogbugz','git'], shared_runners_enabled: Settings.gitlab_ci['shared_runners_enabled'], - max_artifacts_size: Settings.gitlab_ci['max_artifacts_size'], + max_artifacts_size: Settings.artifacts['max_size'], ) end diff --git a/app/uploaders/artifact_uploader.rb b/app/uploaders/artifact_uploader.rb index b4e0fc5772d..1dccc39e7e2 100644 --- a/app/uploaders/artifact_uploader.rb +++ b/app/uploaders/artifact_uploader.rb @@ -5,15 +5,15 @@ class ArtifactUploader < CarrierWave::Uploader::Base attr_accessor :build, :field def self.artifacts_path - File.expand_path('shared/artifacts/', Rails.root) + Gitlab.config.artifacts.path end def self.artifacts_upload_path - File.expand_path('shared/artifacts/tmp/uploads/', Rails.root) + File.join(self.artifacts_path, 'tmp/uploads/') end def self.artifacts_cache_path - File.expand_path('shared/artifacts/tmp/cache/', Rails.root) + File.join(self.artifacts_path, 'tmp/cache/') end def initialize(build, field) |