Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
李少辉-开发者
gitlab-foss
提交
b18671a1
G
gitlab-foss
项目概览
李少辉-开发者
/
gitlab-foss
通知
15
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
gitlab-foss
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
b18671a1
编写于
11月 03, 2015
作者:
K
Kamil Trzcinski
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Enable shared runners for all new projects
上级
ccf5e2d6
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
31 addition
and
8 deletion
+31
-8
CHANGELOG
CHANGELOG
+1
-0
app/controllers/admin/application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+1
-0
app/models/application_setting.rb
app/models/application_setting.rb
+2
-1
app/models/project.rb
app/models/project.rb
+4
-1
app/views/admin/application_settings/_form.html.haml
app/views/admin/application_settings/_form.html.haml
+9
-0
config/initializers/1_settings.rb
config/initializers/1_settings.rb
+5
-4
db/migrate/20151103133339_add_shared_runners_setting.rb
db/migrate/20151103133339_add_shared_runners_setting.rb
+5
-0
db/schema.rb
db/schema.rb
+2
-1
lib/gitlab/current_settings.rb
lib/gitlab/current_settings.rb
+2
-1
未找到文件。
CHANGELOG
浏览文件 @
b18671a1
...
...
@@ -14,6 +14,7 @@ v 8.2.0 (unreleased)
- 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
浏览文件 @
b18671a1
...
...
@@ -57,6 +57,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:version_check_enabled
,
:admin_notification_email
,
:user_oauth_applications
,
:shared_runners_enabled
,
restricted_visibility_levels:
[],
import_sources:
[]
)
...
...
app/models/application_setting.rb
浏览文件 @
b18671a1
...
...
@@ -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
...
...
app/models/project.rb
浏览文件 @
b18671a1
...
...
@@ -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
...
...
app/views/admin/application_settings/_form.html.haml
浏览文件 @
b18671a1
...
...
@@ -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
浏览文件 @
b18671a1
...
...
@@ -181,10 +181,11 @@ Settings.gitlab['import_sources'] ||= ['github','bitbucket','gitlab','gitorious'
# 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
浏览文件 @
b18671a1
class
AddSharedRunnersSetting
<
ActiveRecord
::
Migration
def
up
add_column
:application_settings
,
:shared_runners_enabled
,
:boolean
,
default:
true
,
null:
false
end
end
db/schema.rb
浏览文件 @
b18671a1
...
...
@@ -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 @@ ActiveRecord::Schema.define(version: 20151103001141) do
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
浏览文件 @
b18671a1
...
...
@@ -23,7 +23,8 @@ module Gitlab
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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录