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
9ff492bd
Commit
9ff492bd
authored
Apr 12, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename build minutes to pipeline minutes
parent
4fe09a78
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
33 additions
and
33 deletions
+33
-33
app/views/admin/application_settings/_shared_runners_minutes_setting.html.haml
...cation_settings/_shared_runners_minutes_setting.html.haml
+2
-2
app/views/admin/projects/_shared_runner_status.html.haml
app/views/admin/projects/_shared_runner_status.html.haml
+2
-2
app/views/groups/pipeline_quota/index.html.haml
app/views/groups/pipeline_quota/index.html.haml
+1
-1
app/views/namespaces/_shared_runner_status.html.haml
app/views/namespaces/_shared_runner_status.html.haml
+1
-1
app/views/namespaces/_shared_runners_minutes_setting.html.haml
...iews/namespaces/_shared_runners_minutes_setting.html.haml
+2
-2
app/views/projects/builds/_shared_runner_limit_warning.html.haml
...ws/projects/builds/_shared_runner_limit_warning.html.haml
+1
-1
app/views/shared/_shared_runners_minutes_limit.html.haml
app/views/shared/_shared_runners_minutes_limit.html.haml
+1
-1
doc/user/admin_area/settings/continuous_integration.md
doc/user/admin_area/settings/continuous_integration.md
+10
-10
spec/features/admin/admin_users_spec.rb
spec/features/admin/admin_users_spec.rb
+3
-3
spec/features/ci_shared_runner_settings_spec.rb
spec/features/ci_shared_runner_settings_spec.rb
+4
-4
spec/features/ci_shared_runner_warnings_spec.rb
spec/features/ci_shared_runner_warnings_spec.rb
+2
-2
spec/features/projects/builds_spec.rb
spec/features/projects/builds_spec.rb
+1
-1
spec/models/ee/ci/build_spec.rb
spec/models/ee/ci/build_spec.rb
+1
-1
spec/models/ee/project_spec.rb
spec/models/ee/project_spec.rb
+2
-2
No files found.
app/views/admin/application_settings/_shared_runners_minutes_setting.html.haml
View file @
9ff492bd
.form-group
=
form
.
label
:shared_runners_minutes
,
'
Build
minutes quota'
,
class:
'control-label col-sm-2'
=
form
.
label
:shared_runners_minutes
,
'
Pipeline
minutes quota'
,
class:
'control-label col-sm-2'
.col-sm-10
=
form
.
number_field
:shared_runners_minutes
,
class:
'form-control'
.help-block
Set the maximum number of
build
minutes that a group can use on shared Runners per month.
Set the maximum number of
pipeline
minutes that a group can use on shared Runners per month.
0 for unlimited.
=
link_to
icon
(
'question-circle'
),
help_page_path
(
"user/admin_area/settings/continuous_integration"
,
anchor:
"shared-runners-build-minutes-quota"
),
target:
'_blank'
app/views/admin/projects/_shared_runner_status.html.haml
View file @
9ff492bd
...
...
@@ -6,8 +6,8 @@
Enabled
-
if
project
.
shared_runners_minutes_limit_enabled?
-
limit
=
project
.
actual_shared_runners_minutes_limit
.
to_i
(Limited to
#{
limit
}
build
minutes per month)
(Limited to
#{
limit
}
pipeline
minutes per month)
-
else
(Unlimited
build
minutes)
(Unlimited
pipeline
minutes)
-
else
Disabled
app/views/groups/pipeline_quota/index.html.haml
View file @
9ff492bd
...
...
@@ -5,7 +5,7 @@
Group pipelines quota
=
link_to
icon
(
'question-circle'
),
help_page_path
(
"user/admin_area/settings/continuous_integration"
,
anchor:
"shared-runners-build-minutes-quota"
),
target:
'_blank'
%p
.light
Monthly
build
minutes usage across shared Runners for the
Monthly
pipeline
minutes usage across shared Runners for the
%strong
=
@group
.
name
group
...
...
app/views/namespaces/_shared_runner_status.html.haml
View file @
9ff492bd
-
namespace
=
local_assigns
.
fetch
(
:namespace
)
-
if
namespace
.
shared_runners_enabled?
%li
%span
.light
Build
minutes quota:
%span
.light
Pipeline
minutes quota:
%strong
=
group_shared_runner_limits_quota
(
namespace
)
=
link_to
icon
(
'question-circle'
),
help_page_path
(
"user/admin_area/settings/continuous_integration"
,
anchor:
"shared-runners-build-minutes-quota"
),
target:
'_blank'
app/views/namespaces/_shared_runners_minutes_setting.html.haml
View file @
9ff492bd
-
if
current_user
.
admin?
.form-group
=
f
.
label
:shared_runners_minutes_limit
,
class:
'control-label'
do
Build
Minutes Quota
Pipeline
Minutes Quota
.col-sm-10
=
f
.
number_field
:shared_runners_minutes_limit
,
class:
'form-control'
,
min:
0
%span
.help-block
#shared_runners_minutes_limit_help_block
Set the maximum number of
build
minutes that a group can use on shared Runners per month.
Set the maximum number of
pipeline
minutes that a group can use on shared Runners per month.
Set 0 for unlimited.
Set empty to inherit the global setting of
#{
current_application_settings
.
shared_runners_minutes
}
.
=
link_to
icon
(
'question-circle'
),
help_page_path
(
"user/admin_area/settings/continuous_integration"
,
anchor:
"shared-runners-build-minutes-quota"
),
target:
'_blank'
app/views/projects/builds/_shared_runner_limit_warning.html.haml
View file @
9ff492bd
...
...
@@ -3,7 +3,7 @@
-
quota_limit
=
project
.
namespace
.
actual_shared_runners_minutes_limit
.bs-callout.bs-callout-warning
%p
You have used all your shared Runners
build
minutes.
You have used all your shared Runners
pipeline
minutes.
=
"(
#{
quota_used
}
of
#{
quota_limit
}
)."
-
if
can?
(
current_user
,
:admin_build
,
@project
)
%br
...
...
app/views/shared/_shared_runners_minutes_limit.html.haml
View file @
9ff492bd
...
...
@@ -6,7 +6,7 @@
-
if
cookies
[
:hide_shared_runner_quota_message
].
blank?
&&
has_limit
&&
namespace
.
shared_runners_minutes_used?
&&
can_see_status
.shared-runner-quota-message.alert.alert-warning.hidden-xs
{
data:
{
scope:
scope
}
}
=
namespace
.
name
has exceeded their
build
minutes quota. Pipelines will not run anymore on shared Runners.
has exceeded their
pipeline
minutes quota. Pipelines will not run anymore on shared Runners.
.pull-right
=
link_to
'Remind later'
,
'#'
,
class:
'hide-shared-runner-limit-message alert-link'
doc/user/admin_area/settings/continuous_integration.md
View file @
9ff492bd
...
...
@@ -37,13 +37,13 @@ expiration.
[
art-yml
]:
../../../administration/job_artifacts.md
[
duration-syntax
]:
../../../ci/yaml/README.md#artifactsexpire_in
## Shared Runners
build
minutes quota
## Shared Runners
pipeline
minutes quota
> [Introduced][ee-1078] in GitLab Enterprise Edition 8.16.
If you have enabled shared Runners for your GitLab instance, you can limit their
usage by setting a maximum number of
build
minutes that a group can use on
shared Runners per month. Set 0 to grant unlimited
build
minutes.
usage by setting a maximum number of
pipeline
minutes that a group can use on
shared Runners per month. Set 0 to grant unlimited
pipeline
minutes.
While build limits are stored as minutes, the counting is done in seconds.
1.
Go to the
**Admin area ➔ Settings**
(
`/admin/application_settings`
).
...
...
@@ -51,23 +51,23 @@ While build limits are stored as minutes, the counting is done in seconds.
![Admin area settings button](img/admin_area_settings_button.png)
1.
Navigate to the
**Continuous Integration**
block and enable the Shared
Runners setting. Then set the
build
minutes quota limit.
Runners setting. Then set the
pipeline
minutes quota limit.
![Shared Runners
build
minutes quota](img/ci_shared_runners_build_minutes_quota.png)
![Shared Runners
pipeline
minutes quota](img/ci_shared_runners_build_minutes_quota.png)
1.
Hit
**Save**
for the changes to take effect.
---
While the setting in the Admin area has a global effect, as an admin you can
also change each group's
build
minutes quota to override the global value.
also change each group's
pipeline
minutes quota to override the global value.
1.
Navigate to the
**Groups**
admin area and hit the
**Edit**
button for the
group you wish to change the
build
minutes quota.
group you wish to change the
pipeline
minutes quota.
![Groups in the admin area](img/admin_area_groups.png)
1.
Set the
build
minutes quota to the desired value and hit
**Save changes**
for
1.
Set the
pipeline
minutes quota to the desired value and hit
**Save changes**
for
the changes to take effect.
![Edit group in the admin area](img/admin_area_group_edit.png)
...
...
@@ -81,12 +81,12 @@ are enabled.
![
Project admin info
](
img/admin_project_quota_view.png
)
When the
build
minutes quota for a group is set to a value different than 0,
When the
pipeline
minutes quota for a group is set to a value different than 0,
the
**Pipelines quota**
page is available to the group page settings list.
![
Group settings
](
img/group_settings.png
)
You can see there an overview of the
build
minutes quota of all projects of
You can see there an overview of the
pipeline
minutes quota of all projects of
the group.
![
Group pipelines quota
](
img/group_pipelines_quota.png
)
...
...
spec/features/admin/admin_users_spec.rb
View file @
9ff492bd
...
...
@@ -208,7 +208,7 @@ describe "Admin::Users", feature: true do
click_link
user
.
name
expect
(
page
).
to
have_content
(
'
Build
minutes quota: 0 / 500'
)
expect
(
page
).
to
have_content
(
'
Pipeline
minutes quota: 0 / 500'
)
end
end
...
...
@@ -222,7 +222,7 @@ describe "Admin::Users", feature: true do
click_link
user
.
name
expect
(
page
).
not_to
have_content
(
'
Build
minutes quota:'
)
expect
(
page
).
not_to
have_content
(
'
Pipeline
minutes quota:'
)
end
end
end
...
...
@@ -299,7 +299,7 @@ describe "Admin::Users", feature: true do
end
it
"shows page with new data"
do
expect
(
page
).
to
have_content
(
'
Build
minutes quota: 0 / 500'
)
expect
(
page
).
to
have_content
(
'
Pipeline
minutes quota: 0 / 500'
)
end
end
end
...
...
spec/features/ci_shared_runner_settings_spec.rb
View file @
9ff492bd
...
...
@@ -15,7 +15,7 @@ feature 'CI shared runner settings', feature: true do
context
'without global shared runners quota'
do
scenario
'should display ratio with global quota'
do
visit_admin_group_path
expect
(
page
).
to
have_content
(
"
Build
minutes quota: 400 / Unlimited"
)
expect
(
page
).
to
have_content
(
"
Pipeline
minutes quota: 400 / Unlimited"
)
expect
(
page
).
to
have_selector
(
'.shared_runners_limit_disabled'
)
end
end
...
...
@@ -27,21 +27,21 @@ feature 'CI shared runner settings', feature: true do
scenario
'should display ratio with global quota'
do
visit_admin_group_path
expect
(
page
).
to
have_content
(
"
Build
minutes quota: 400 / 500"
)
expect
(
page
).
to
have_content
(
"
Pipeline
minutes quota: 400 / 500"
)
expect
(
page
).
to
have_selector
(
'.shared_runners_limit_under_quota'
)
end
scenario
'should display new ratio with overridden group quota'
do
set_group_shared_runners_minutes
300
visit_admin_group_path
expect
(
page
).
to
have_content
(
"
Build
minutes quota: 400 / 300"
)
expect
(
page
).
to
have_content
(
"
Pipeline
minutes quota: 400 / 300"
)
expect
(
page
).
to
have_selector
(
'.shared_runners_limit_over_quota'
)
end
scenario
'should display unlimited ratio with overridden group quota'
do
set_group_shared_runners_minutes
0
visit_admin_group_path
expect
(
page
).
to
have_content
(
"
Build
minutes quota: 400 / Unlimited"
)
expect
(
page
).
to
have_content
(
"
Pipeline
minutes quota: 400 / Unlimited"
)
expect
(
page
).
to
have_selector
(
'.shared_runners_limit_disabled'
)
end
end
...
...
spec/features/ci_shared_runner_warnings_spec.rb
View file @
9ff492bd
...
...
@@ -32,12 +32,12 @@ feature 'CI shared runner limits', feature: true do
scenario
'it displays a warning message on project homepage'
do
visit_project_home
expect_quota_exceeded_alert
(
"
#{
group
.
name
}
has exceeded their
build
minutes quota."
)
expect_quota_exceeded_alert
(
"
#{
group
.
name
}
has exceeded their
pipeline
minutes quota."
)
end
scenario
'it displays a warning message on pipelines page'
do
visit_project_pipelines
expect_quota_exceeded_alert
(
"
#{
group
.
name
}
has exceeded their
build
minutes quota."
)
expect_quota_exceeded_alert
(
"
#{
group
.
name
}
has exceeded their
pipeline
minutes quota."
)
end
end
...
...
spec/features/projects/builds_spec.rb
View file @
9ff492bd
...
...
@@ -282,7 +282,7 @@ feature 'Builds', :feature do
it
'displays a warning message'
do
visit
namespace_project_build_path
(
project
.
namespace
,
project
,
build
)
expect
(
page
).
to
have_content
(
'You have used all your shared Runners
build
minutes.'
)
expect
(
page
).
to
have_content
(
'You have used all your shared Runners
pipeline
minutes.'
)
end
end
end
...
...
spec/models/ee/ci/build_spec.rb
View file @
9ff492bd
...
...
@@ -41,7 +41,7 @@ describe Ci::Build, models: true do
end
end
context
'updates
build
minutes'
do
context
'updates
pipeline
minutes'
do
let
(
:build
)
{
create
(
:ci_build
,
:running
,
pipeline:
pipeline
)
}
%w(success drop cancel)
.
each
do
|
event
|
...
...
spec/models/ee/project_spec.rb
View file @
9ff492bd
...
...
@@ -31,7 +31,7 @@ describe Project, models: true do
expect
(
project
.
any_runners?
{
|
runner
|
runner
==
shared_runner
}).
to
be_truthy
end
context
'with used
build
minutes'
do
context
'with used
pipeline
minutes'
do
let
(
:namespace
)
{
create
(
:namespace
,
:with_used_build_minutes_limit
)
}
let
(
:project
)
do
create
(
:empty_project
,
...
...
@@ -49,7 +49,7 @@ describe Project, models: true do
describe
'#shared_runners_available?'
do
subject
{
project
.
shared_runners_available?
}
context
'with used
build
minutes'
do
context
'with used
pipeline
minutes'
do
let
(
:namespace
)
{
create
(
:namespace
,
:with_used_build_minutes_limit
)
}
let
(
:project
)
do
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