Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
8f6024433383
Commit
8f602443
authored
Nov 03, 2015
by
Kamil Trzcinski
Browse files
Enable shared runners for all new projects
parent
805ce49ff7e4
Changes
9
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
8f602443
...
...
@@ -14,6 +14,7 @@
- Use git follow flag for commits page when retrieve history for file or directory
- Show merge request CI status on merge requests index page
- Extend yml syntax for only and except to support specifying repository path
- Enable shared runners to all new projects
- Fix: 500 error returned if destroy request without HTTP referer (Kazuki Shimizu)
- Remove deprecated CI events from project settings page
- Use issue editor as cross reference comment author when issue is edited with a new mention.
...
...
app/controllers/admin/application_settings_controller.rb
View file @
8f602443
...
...
@@ -57,6 +57,7 @@
:version_check_enabled
,
:admin_notification_email
,
:user_oauth_applications
,
:shared_runners_enabled
,
restricted_visibility_levels:
[],
import_sources:
[]
)
...
...
app/models/application_setting.rb
View file @
8f602443
...
...
@@ -87,7 +87,8 @@
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
...
...
app/models/project.rb
View file @
8f602443
...
...
@@ -37,6 +37,7 @@
include
Gitlab
::
ConfigHelper
include
Gitlab
::
ShellAdapter
include
Gitlab
::
VisibilityLevel
include
Gitlab
::
CurrentSettings
include
Referable
include
Sortable
include
AfterCommitQueue
...
...
@@ -775,7 +776,9 @@
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
...
...
app/views/admin/application_settings/_form.html.haml
View file @
8f602443
...
...
@@ -130,5 +130,14 @@
=
f
.
text_area
:help_page_text
,
class:
'form-control'
,
rows:
4
.help-block
Markdown enabled
%fieldset
%legend
Continuous Integration
.form-group
.col-sm-offset-2.col-sm-10
.checkbox
=
f
.
label
:shared_runners_enabled
do
=
f
.
check_box
:shared_runners_enabled
Enable shared runners for a new projects
.form-actions
=
f
.
submit
'Save'
,
class:
'btn btn-primary'
config/initializers/1_settings.rb
View file @
8f602443
...
...
@@ -181,10 +181,11 @@
# CI
#
Settings
[
'gitlab_ci'
]
||=
Settingslogic
.
new
({})
Settings
.
gitlab_ci
[
'all_broken_builds'
]
=
true
if
Settings
.
gitlab_ci
[
'all_broken_builds'
].
nil?
Settings
.
gitlab_ci
[
'add_pusher'
]
=
false
if
Settings
.
gitlab_ci
[
'add_pusher'
].
nil?
Settings
.
gitlab_ci
[
'url'
]
||=
Settings
.
send
(
:build_gitlab_ci_url
)
Settings
.
gitlab_ci
[
'builds_path'
]
=
File
.
expand_path
(
Settings
.
gitlab_ci
[
'builds_path'
]
||
"builds/"
,
Rails
.
root
)
Settings
.
gitlab_ci
[
'shared_runners_enabled'
]
=
true
if
Settings
.
gitlab_ci
[
'shared_runners_enabled'
].
nil?
Settings
.
gitlab_ci
[
'all_broken_builds'
]
=
true
if
Settings
.
gitlab_ci
[
'all_broken_builds'
].
nil?
Settings
.
gitlab_ci
[
'add_pusher'
]
=
false
if
Settings
.
gitlab_ci
[
'add_pusher'
].
nil?
Settings
.
gitlab_ci
[
'url'
]
||=
Settings
.
send
(
:build_gitlab_ci_url
)
Settings
.
gitlab_ci
[
'builds_path'
]
=
File
.
expand_path
(
Settings
.
gitlab_ci
[
'builds_path'
]
||
"builds/"
,
Rails
.
root
)
#
# Reply by email
...
...
db/migrate/20151103133339_add_shared_runners_setting.rb
0 → 100644
View file @
8f602443
class
AddSharedRunnersSetting
<
ActiveRecord
::
Migration
def
up
add_column
:application_settings
,
:shared_runners_enabled
,
:boolean
,
default:
true
,
null:
false
end
end
db/schema.rb
View file @
8f602443
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
20151103
001141
)
do
ActiveRecord
::
Schema
.
define
(
version:
20151103
133339
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -47,6 +47,7 @@
t
.
text
"import_sources"
t
.
text
"help_page_text"
t
.
string
"admin_notification_email"
t
.
boolean
"shared_runners_enabled"
,
default:
true
,
null:
false
end
create_table
"audit_events"
,
force:
true
do
|
t
|
...
...
lib/gitlab/current_settings.rb
View file @
8f602443
...
...
@@ -23,7 +23,8 @@
restricted_visibility_levels:
Settings
.
gitlab
[
'restricted_visibility_levels'
],
max_attachment_size:
Settings
.
gitlab
[
'max_attachment_size'
],
session_expire_delay:
Settings
.
gitlab
[
'session_expire_delay'
],
import_sources:
Settings
.
gitlab
[
'import_sources'
]
import_sources:
Settings
.
gitlab
[
'import_sources'
],
shared_runners_enabled:
Settings
.
gitlab_ci
[
'shared_runners_enabled'
],
)
end
...
...
Write
Preview
Supports
Markdown
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