ini
This commit is contained in:
parent
8100274518
commit
e992468714
|
@ -5,7 +5,7 @@ module Ci
|
|||
RUNNER_QUEUE_EXPIRY_TIME = 60.minutes
|
||||
ONLINE_CONTACT_TIMEOUT = 1.hour
|
||||
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 :runner_projects, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
|
||||
|
|
|
@ -6,6 +6,12 @@
|
|||
.checkbox
|
||||
= f.check_box :active
|
||||
%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
|
||||
= label :run_untagged, 'Run untagged jobs', class: 'control-label'
|
||||
.col-sm-10
|
||||
|
|
|
@ -19,6 +19,9 @@
|
|||
%tr
|
||||
%td Active
|
||||
%td= @runner.active? ? 'Yes' : 'No'
|
||||
%tr
|
||||
%td Protected
|
||||
%td= @runner.protected? ? 'Yes' : 'No'
|
||||
%tr
|
||||
%td Can run untagged jobs
|
||||
%td= @runner.run_untagged? ? 'Yes' : 'No'
|
||||
|
|
|
@ -0,0 +1,15 @@
|
|||
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
|
|
@ -371,6 +371,7 @@ ActiveRecord::Schema.define(version: 20170824162758) do
|
|||
t.string "architecture"
|
||||
t.boolean "run_untagged", default: true, null: false
|
||||
t.boolean "locked", default: false, null: false
|
||||
t.boolean "protected", default: false, null: false
|
||||
end
|
||||
|
||||
add_index "ci_runners", ["contacted_at"], name: "index_ci_runners_on_contacted_at", using: :btree
|
||||
|
|
Loading…
Reference in New Issue