Skip to content

Port "Protected runner executes jobs on protected branch [Solution 1]" to EE

What does this MR do?

Port "Protected runner executes jobs on protected branch [Solution 1]" to EE

Are there points in the code the reviewer needs to double check?

 > g di
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index d6794ed0ff..1f96fb7c15 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -3,8 +3,11 @@ module Ci
     include TokenAuthenticatable
     include AfterCommitQueue
     include Presentable
-    include Importable
+<<<<<<< HEAD
     prepend EE::Build
+=======
+    include Importable
+>>>>>>> d449355f94... Merge branch 'feature/sm/33281-protected-runner-executes-jobs-on-protected-branch' into 'master'

     belongs_to :runner
     belongs_to :trigger_request
@@ -39,8 +42,11 @@ module Ci
     scope :with_expired_artifacts, ->() { with_artifacts.where('artifacts_expire_at < ?', Time.now) }
     scope :last_month, ->() { where('created_at > ?', Date.today - 1.month) }
     scope :manual_actions, ->() { where(when: :manual, status: COMPLETED_STATUSES + [:manual]) }
+<<<<<<< HEAD
     scope :codequality, ->() { where(name: %w[codequality codeclimate]) }
+=======
     scope :ref_protected, -> { where(protected: true) }
+>>>>>>> d449355f94... Merge branch 'feature/sm/33281-protected-runner-executes-jobs-on-protected-branch' into 'master'

     mount_uploader :artifacts_file, ArtifactUploader
     mount_uploader :artifacts_metadata, ArtifactUploader
diff --git a/db/schema.rb b/db/schema.rb
index cf75067d51..08b9740848 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -299,9 +299,12 @@ ActiveRecord::Schema.define(version: 20170824162758) do
     t.integer "auto_canceled_by_id"
     t.boolean "retried"
     t.integer "stage_id"
+<<<<<<< HEAD
     t.integer "artifacts_file_store"
     t.integer "artifacts_metadata_store"
+=======
     t.boolean "protected"
+>>>>>>> d449355f94... Merge branch 'feature/sm/33281-protected-runner-executes-jobs-on-protected-branch' into 'master'
   end

   add_index "ci_builds", ["auto_canceled_by_id"], name: "index_ci_builds_on_auto_canceled_by_id", using: :btree

What are the relevant issue numbers?

Merge request reports

Loading