Allow setting up group runners in group CI/CD settings (#10244)
This commit is contained in:
parent
3f91c91644
commit
c1b8c65fee
5 changed files with 73 additions and 2 deletions
19
app/views/groups/runners/_group_runners.html.haml
Normal file
19
app/views/groups/runners/_group_runners.html.haml
Normal file
|
@ -0,0 +1,19 @@
|
|||
%h3 Group Runners
|
||||
|
||||
.bs-callout.bs-callout-warning
|
||||
GitLab Group Runners can execute code for all the projects in this group.
|
||||
They can be managed using the #{link_to 'Runners API', help_page_path('api/runners.md')}.
|
||||
|
||||
- if @group.runners.empty?
|
||||
This group does not provide any group Runners yet.
|
||||
|
||||
- if can?(current_user, :admin_pipeline, @group)
|
||||
= render partial: 'ci/runner/how_to_setup_runner',
|
||||
locals: { registration_token: @group.runners_token, type: 'group' }
|
||||
- else
|
||||
Ask your group master to setup a group Runner.
|
||||
|
||||
- else
|
||||
%h4.underlined-title Available group Runners : #{@group.runners.count}
|
||||
%ul.bordered-list
|
||||
= render partial: 'groups/runners/runner', collection: @group.runners, as: :runner
|
23
app/views/groups/runners/_index.html.haml
Normal file
23
app/views/groups/runners/_index.html.haml
Normal file
|
@ -0,0 +1,23 @@
|
|||
.light.prepend-top-default
|
||||
%p
|
||||
A 'Runner' is a process which runs a job.
|
||||
You can setup as many Runners as you need.
|
||||
%br
|
||||
Runners can be placed on separate users, servers, and even on your local machine.
|
||||
|
||||
%p Each Runner can be in one of the following states:
|
||||
%div
|
||||
%ul
|
||||
%li
|
||||
%span.label.label-success active
|
||||
\- Runner is active and can process any new jobs
|
||||
%li
|
||||
%span.label.label-danger paused
|
||||
\- Runner is paused and will not receive any new jobs
|
||||
|
||||
%hr
|
||||
|
||||
%p.lead To start serving your jobs you can add Runners to your group
|
||||
.row
|
||||
.col-sm-6
|
||||
= render 'groups/runners/group_runners'
|
18
app/views/groups/runners/_runner.html.haml
Normal file
18
app/views/groups/runners/_runner.html.haml
Normal file
|
@ -0,0 +1,18 @@
|
|||
%li.runner{ id: dom_id(runner) }
|
||||
%h4
|
||||
= runner_status_icon(runner)
|
||||
|
||||
%span.commit-sha
|
||||
= runner.short_sha
|
||||
|
||||
.pull-right
|
||||
%small.light
|
||||
\##{runner.id}
|
||||
- if runner.description.present?
|
||||
%p.runner-description
|
||||
= runner.description
|
||||
- if runner.tag_list.present?
|
||||
%p
|
||||
- runner.tag_list.sort.each do |tag|
|
||||
%span.label.label-primary
|
||||
= tag
|
|
@ -14,3 +14,14 @@
|
|||
= render "ci/variables/content"
|
||||
.settings-content
|
||||
= render 'ci/variables/index', save_endpoint: group_variables_path
|
||||
|
||||
%section.settings.no-animate{ class: ('expanded' if expanded) }
|
||||
.settings-header
|
||||
%h4
|
||||
Runners settings
|
||||
%button.btn.js-settings-toggle
|
||||
= expanded ? 'Collapse' : 'Expand'
|
||||
%p
|
||||
Register and see your runners for this group.
|
||||
.settings-content
|
||||
= render 'groups/runners/index'
|
||||
|
|
|
@ -21,8 +21,8 @@
|
|||
This group does not provide any group Runners yet.
|
||||
|
||||
- if can?(current_user, :admin_pipeline, @project.group)
|
||||
= render partial: 'ci/runner/how_to_setup_runner',
|
||||
locals: { registration_token: @project.group.runners_token, type: 'group' }
|
||||
You can register group runners in the
|
||||
= link_to 'Group CI/CD settings', group_settings_ci_cd_path(@project.group)
|
||||
- else
|
||||
Ask your group master to setup a group Runner.
|
||||
|
||||
|
|
Loading…
Reference in a new issue