diff options
author | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-03 14:45:41 +0100 |
---|---|---|
committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2015-11-05 17:02:02 +0100 |
commit | b18671a1b2c565a87663544441000063f6b83c8e (patch) | |
tree | 6350650632e8bb2bbe2c19c674a8e7ee5d67391a /app/models | |
parent | ccf5e2d6baafc4cae5e48be59ce8a50b7ac7f42f (diff) | |
download | gitlab-ce-b18671a1b2c565a87663544441000063f6b83c8e.tar.gz |
Enable shared runners for all new projects
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/application_setting.rb | 3 | ||||
-rw-r--r-- | app/models/project.rb | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/app/models/application_setting.rb b/app/models/application_setting.rb index 05430c2ee18..266045f7afa 100644 --- a/app/models/application_setting.rb +++ b/app/models/application_setting.rb @@ -87,7 +87,8 @@ class ApplicationSetting < ActiveRecord::Base default_project_visibility: Settings.gitlab.default_projects_features['visibility_level'], default_snippet_visibility: Settings.gitlab.default_projects_features['visibility_level'], restricted_signup_domains: Settings.gitlab['restricted_signup_domains'], - import_sources: ['github','bitbucket','gitlab','gitorious','google_code','fogbugz','git'] + import_sources: ['github','bitbucket','gitlab','gitorious','google_code','fogbugz','git'], + shared_runners_enabled: Settings.gitlab_ci['shared_runners_enabled'], ) end diff --git a/app/models/project.rb b/app/models/project.rb index 74b89aad499..57db7f9f0a4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -37,6 +37,7 @@ class Project < ActiveRecord::Base include Gitlab::ConfigHelper include Gitlab::ShellAdapter include Gitlab::VisibilityLevel + include Gitlab::CurrentSettings include Referable include Sortable include AfterCommitQueue @@ -775,7 +776,9 @@ class Project < ActiveRecord::Base end def ensure_gitlab_ci_project - gitlab_ci_project || create_gitlab_ci_project + gitlab_ci_project || create_gitlab_ci_project( + shared_runners_enabled: current_application_settings.shared_runners_enabled + ) end def enable_ci |