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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
2aa57071
Commit
2aa57071
authored
May 05, 2016
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extend runner config options for untagged jobs
parent
a8a205cd
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
51 additions
and
35 deletions
+51
-35
app/models/ci/runner.rb
app/models/ci/runner.rb
+1
-1
app/views/admin/runners/show.html.haml
app/views/admin/runners/show.html.haml
+0
-2
app/views/projects/runners/_runner.html.haml
app/views/projects/runners/_runner.html.haml
+1
-1
app/views/projects/runners/show.html.haml
app/views/projects/runners/show.html.haml
+20
-31
spec/features/runners_spec.rb
spec/features/runners_spec.rb
+29
-0
No files found.
app/models/ci/runner.rb
View file @
2aa57071
...
...
@@ -4,7 +4,7 @@ module Ci
LAST_CONTACT_TIME
=
5
.
minutes
.
ago
AVAILABLE_SCOPES
=
%w[specific shared active paused online]
FORM_EDITABLE
=
%i[description tag_list active]
FORM_EDITABLE
=
%i[description tag_list active
run_untagged
]
has_many
:builds
,
class_name:
'Ci::Build'
has_many
:runner_projects
,
dependent: :destroy
,
class_name:
'Ci::RunnerProject'
...
...
app/views/admin/runners/show.html.haml
View file @
2aa57071
...
...
@@ -9,8 +9,6 @@
%span
.runner-state.runner-state-specific
Specific
-
if
@runner
.
shared?
.bs-callout.bs-callout-success
%h4
This runner will process builds from ALL UNASSIGNED projects
...
...
app/views/projects/runners/_runner.html.haml
View file @
2aa57071
...
...
@@ -5,7 +5,7 @@
-
if
@runners
.
include?
(
runner
)
=
link_to
runner
.
short_sha
,
runner_path
(
runner
)
%small
=
link_to
edit_namespace_project_runner_path
(
@project
.
namespace
,
@project
,
runner
)
do
=
link_to
edit_namespace_project_runner_path
(
@project
.
namespace
,
@project
,
runner
)
do
%i
.fa.fa-edit.btn
-
else
=
runner
.
short_sha
...
...
app/views/projects/runners/show.html.haml
View file @
2aa57071
...
...
@@ -17,50 +17,39 @@
%th
Property Name
%th
Value
%tr
%td
Tags
%td
Active
%td
=
@runner
.
active?
?
'Yes'
:
'No'
%tr
%td
Can run untagged jobs
%td
=
@runner
.
run_untagged?
?
'Yes'
:
'No'
%tr
%td
Tags
%td
-
@runner
.
tag_list
.
each
do
|
tag
|
%span
.label.label-primary
=
tag
%tr
%td
Name
%td
=
@runner
.
name
%td
Name
%td
=
@runner
.
name
%tr
%td
Version
%td
=
@runner
.
version
%td
Version
%td
=
@runner
.
version
%tr
%td
Revision
%td
=
@runner
.
revision
%td
Revision
%td
=
@runner
.
revision
%tr
%td
Platform
%td
=
@runner
.
platform
%td
Platform
%td
=
@runner
.
platform
%tr
%td
Architecture
%td
=
@runner
.
architecture
%td
Architecture
%td
=
@runner
.
architecture
%tr
%td
Description
%td
=
@runner
.
description
%td
Description
%td
=
@runner
.
description
%tr
%td
Last contact
%td
Last contact
%td
-
if
@runner
.
contacted_at
#{
time_ago_in_words
(
@runner
.
contacted_at
)
}
ago
-
else
Never
spec/features/runners_spec.rb
View file @
2aa57071
...
...
@@ -110,4 +110,33 @@ describe "Runners" do
expect
(
page
).
to
have_content
(
@specific_runner
.
platform
)
end
end
feature
'configuring runners ability to picking untagged jobs'
do
given
(
:project
)
{
create
(
:empty_project
)
}
given
(
:runner
)
{
create
(
:ci_runner
)
}
background
do
project
.
team
<<
[
user
,
:master
]
project
.
runners
<<
runner
end
scenario
'user checks default configuration'
do
visit
namespace_project_runner_path
(
project
.
namespace
,
project
,
runner
)
expect
(
page
).
to
have_content
'Can run untagged jobs Yes'
end
scenario
'user want to prevent runner from running untagged job'
do
visit
runners_path
(
project
)
page
.
within
(
'.activated-specific-runners'
)
do
first
(
'small > a'
).
click
end
uncheck
'runner_run_untagged'
click_button
'Save changes'
expect
(
page
).
to
have_content
'Can run untagged jobs No'
expect
(
runner
.
reload
.
run_untagged?
).
to
eq
false
end
end
end
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