Allow setting up group runners in group CI/CD settings (#10244)

This commit is contained in:
Dylan Griffith 2018-04-04 11:12:26 +10:00
parent 3f91c91644
commit c1b8c65fee
5 changed files with 73 additions and 2 deletions

View 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

View 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'

View 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

View file

@ -14,3 +14,14 @@
= render "ci/variables/content" = render "ci/variables/content"
.settings-content .settings-content
= render 'ci/variables/index', save_endpoint: group_variables_path = 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'

View file

@ -21,8 +21,8 @@
This group does not provide any group Runners yet. This group does not provide any group Runners yet.
- if can?(current_user, :admin_pipeline, @project.group) - if can?(current_user, :admin_pipeline, @project.group)
= render partial: 'ci/runner/how_to_setup_runner', You can register group runners in the
locals: { registration_token: @project.group.runners_token, type: 'group' } = link_to 'Group CI/CD settings', group_settings_ci_cd_path(@project.group)
- else - else
Ask your group master to setup a group Runner. Ask your group master to setup a group Runner.