BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
6b124d42
Commit
6b124d42
authored
Apr 15, 2016
by
Kamil Trzcinski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add configurable shared runners text
parent
5ae4fd21
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
39 additions
and
3 deletions
+39
-3
CHANGELOG
CHANGELOG
+2
-0
application_settings_controller.rb
app/controllers/admin/application_settings_controller.rb
+1
-0
application_settings_helper.rb
app/helpers/application_settings_helper.rb
+4
-0
_form.html.haml
app/views/admin/application_settings/_form.html.haml
+5
-1
_shared_runners.html.haml
app/views/projects/runners/_shared_runners.html.haml
+4
-1
20160415133440_add_shared_runners_text_to_application_settings.rb
...133440_add_shared_runners_text_to_application_settings.rb
+5
-0
schema.rb
db/schema.rb
+2
-1
runners_spec.rb
spec/features/runners_spec.rb
+16
-0
No files found.
CHANGELOG
View file @
6b124d42
...
...
@@ -18,6 +18,8 @@ v 8.7.0 (unreleased)
- Allow projects to be transfered to a lower visibility level group
- Fix `signed_in_ip` being set to 127.0.0.1 when using a reverse proxy !3524
- Improved Markdown rendering performance !3389
- Improved Markdown rendering performance !3389 (Yorick Peterse)
- Make shared runners text in box configurable (Kamil Trzciński)
- Don't attempt to look up an avatar in repo if repo directory does not exist (Stan Hu)
- API: Ability to subscribe and unsubscribe from issues and merge requests (Robert Schilling)
- Expose project badges in project settings
...
...
app/controllers/admin/application_settings_controller.rb
View file @
6b124d42
...
...
@@ -75,6 +75,7 @@ class Admin::ApplicationSettingsController < Admin::ApplicationController
:admin_notification_email
,
:user_oauth_applications
,
:shared_runners_enabled
,
:shared_runners_text
,
:max_artifacts_size
,
:metrics_enabled
,
:metrics_host
,
...
...
app/helpers/application_settings_helper.rb
View file @
6b124d42
...
...
@@ -15,6 +15,10 @@ module ApplicationSettingsHelper
current_application_settings
.
sign_in_text
end
def
shared_runners_text
current_application_settings
.
shared_runners_text
end
def
user_oauth_applications?
current_application_settings
.
user_oauth_applications
end
...
...
app/views/admin/application_settings/_form.html.haml
View file @
6b124d42
...
...
@@ -153,7 +153,11 @@
=
f
.
label
:shared_runners_enabled
do
=
f
.
check_box
:shared_runners_enabled
Enable shared runners for new projects
.form-group
=
f
.
label
:shared_runners_text
,
class:
'control-label col-sm-2'
.col-sm-10
=
f
.
text_area
:shared_runners_text
,
class:
'form-control'
,
rows:
4
.help-block
Markdown enabled
.form-group
=
f
.
label
:max_artifacts_size
,
'Maximum artifacts size (MB)'
,
class:
'control-label col-sm-2'
.col-sm-10
...
...
app/views/projects/runners/_shared_runners.html.haml
View file @
6b124d42
%h3
Shared runners
.bs-callout.bs-callout-warning
.bs-callout.bs-callout-warning.shared-runners-description
-
if
shared_runners_text
.
present?
=
markdown
(
shared_runners_text
)
-
else
GitLab Runners do not offer secure isolation between projects that they do builds for. You are TRUSTING all GitLab users who can push code to project A, B or C to run shell scripts on the machine hosting runner X.
%hr
-
if
@project
.
shared_runners_enabled?
...
...
db/migrate/20160415133440_add_shared_runners_text_to_application_settings.rb
0 → 100644
View file @
6b124d42
class
AddSharedRunnersTextToApplicationSettings
<
ActiveRecord
::
Migration
def
change
add_column
:application_settings
,
:shared_runners_text
,
:text
end
end
db/schema.rb
View file @
6b124d42
...
...
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2016041
21402
40
)
do
ActiveRecord
::
Schema
.
define
(
version:
2016041
51334
40
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -78,6 +78,7 @@ ActiveRecord::Schema.define(version: 20160412140240) do
t
.
boolean
"email_author_in_body"
,
default:
false
t
.
integer
"default_group_visibility"
t
.
boolean
"repository_checks_enabled"
,
default:
true
t
.
text
"shared_runners_text"
end
create_table
"audit_events"
,
force: :cascade
do
|
t
|
...
...
spec/features/runners_spec.rb
View file @
6b124d42
...
...
@@ -80,6 +80,22 @@ describe "Runners" do
end
end
describe
"shared runners description"
do
let
(
:shared_runners_text
)
{
'custom shared runners description'
}
before
{
stub_application_setting
(
shared_runners_text:
shared_runners_text
)
}
before
do
@project
=
FactoryGirl
.
create
:empty_project
,
shared_runners_enabled:
false
@project
.
team
<<
[
user
,
:master
]
visit
runners_path
(
@project
)
end
it
"sees shared runners description"
do
expect
(
page
.
find
(
".shared-runners-description"
)).
to
have_content
(
shared_runners_text
)
end
end
describe
"show page"
do
before
do
@project
=
FactoryGirl
.
create
:empty_project
...
...
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