Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Jérome Perrin
gitlab-ce
Commits
e9924687
Commit
e9924687
authored
Jul 31, 2017
by
Shinya Maeda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ini
parent
81002745
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
1 deletion
+26
-1
app/models/ci/runner.rb
app/models/ci/runner.rb
+1
-1
app/views/projects/runners/_form.html.haml
app/views/projects/runners/_form.html.haml
+6
-0
app/views/projects/runners/show.html.haml
app/views/projects/runners/show.html.haml
+3
-0
db/migrate/20170731123938_add_protected_to_ci_runners.rb
db/migrate/20170731123938_add_protected_to_ci_runners.rb
+15
-0
db/schema.rb
db/schema.rb
+1
-0
No files found.
app/models/ci/runner.rb
View file @
e9924687
...
@@ -5,7 +5,7 @@ module Ci
...
@@ -5,7 +5,7 @@ module Ci
RUNNER_QUEUE_EXPIRY_TIME
=
60
.
minutes
RUNNER_QUEUE_EXPIRY_TIME
=
60
.
minutes
ONLINE_CONTACT_TIMEOUT
=
1
.
hour
ONLINE_CONTACT_TIMEOUT
=
1
.
hour
AVAILABLE_SCOPES
=
%w[specific shared active paused online]
.
freeze
AVAILABLE_SCOPES
=
%w[specific shared active paused online]
.
freeze
FORM_EDITABLE
=
%i[description tag_list active run_untagged locked]
.
freeze
FORM_EDITABLE
=
%i[description tag_list active run_untagged locked
protected
]
.
freeze
has_many
:builds
has_many
:builds
has_many
:runner_projects
,
dependent: :destroy
# rubocop:disable Cop/ActiveRecordDependent
has_many
:runner_projects
,
dependent: :destroy
# rubocop:disable Cop/ActiveRecordDependent
...
...
app/views/projects/runners/_form.html.haml
View file @
e9924687
...
@@ -6,6 +6,12 @@
...
@@ -6,6 +6,12 @@
.checkbox
.checkbox
=
f
.
check_box
:active
=
f
.
check_box
:active
%span
.light
Paused Runners don't accept new jobs
%span
.light
Paused Runners don't accept new jobs
.form-group
=
label
:protected
,
"Protected"
,
class:
'control-label'
.col-sm-10
.checkbox
=
f
.
check_box
:protected
%span
.light
This runner will only run on pipelines trigged on protected branches
.form-group
.form-group
=
label
:run_untagged
,
'Run untagged jobs'
,
class:
'control-label'
=
label
:run_untagged
,
'Run untagged jobs'
,
class:
'control-label'
.col-sm-10
.col-sm-10
...
...
app/views/projects/runners/show.html.haml
View file @
e9924687
...
@@ -19,6 +19,9 @@
...
@@ -19,6 +19,9 @@
%tr
%tr
%td
Active
%td
Active
%td
=
@runner
.
active?
?
'Yes'
:
'No'
%td
=
@runner
.
active?
?
'Yes'
:
'No'
%tr
%td
Protected
%td
=
@runner
.
protected?
?
'Yes'
:
'No'
%tr
%tr
%td
Can run untagged jobs
%td
Can run untagged jobs
%td
=
@runner
.
run_untagged?
?
'Yes'
:
'No'
%td
=
@runner
.
run_untagged?
?
'Yes'
:
'No'
...
...
db/migrate/20170731123938_add_protected_to_ci_runners.rb
0 → 100644
View file @
e9924687
class
AddProtectedToCiRunners
<
ActiveRecord
::
Migration
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_column_with_default
(
:ci_runners
,
:protected
,
:boolean
,
default:
false
)
end
def
down
remove_column
(
:ci_runners
,
:protected
)
end
end
db/schema.rb
View file @
e9924687
...
@@ -371,6 +371,7 @@ ActiveRecord::Schema.define(version: 20170824162758) do
...
@@ -371,6 +371,7 @@ ActiveRecord::Schema.define(version: 20170824162758) do
t
.
string
"architecture"
t
.
string
"architecture"
t
.
boolean
"run_untagged"
,
default:
true
,
null:
false
t
.
boolean
"run_untagged"
,
default:
true
,
null:
false
t
.
boolean
"locked"
,
default:
false
,
null:
false
t
.
boolean
"locked"
,
default:
false
,
null:
false
t
.
boolean
"protected"
,
default:
false
,
null:
false
end
end
add_index
"ci_runners"
,
[
"contacted_at"
],
name:
"index_ci_runners_on_contacted_at"
,
using: :btree
add_index
"ci_runners"
,
[
"contacted_at"
],
name:
"index_ci_runners_on_contacted_at"
,
using: :btree
...
...
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