Commit 9e76a6f8 authored by Andy Soiron's avatar Andy Soiron

Merge branch 'dc-dead-build-code' into 'master'

Remove some dead code from Ci::Build

See merge request gitlab-org/gitlab!71571
parents 98bd22a1 c0d3c732
...@@ -194,7 +194,6 @@ module Ci ...@@ -194,7 +194,6 @@ module Ci
add_authentication_token_field :token, encrypted: :required add_authentication_token_field :token, encrypted: :required
before_save :ensure_token before_save :ensure_token
before_destroy { unscoped_project }
after_save :stick_build_if_status_changed after_save :stick_build_if_status_changed
...@@ -1156,10 +1155,6 @@ module Ci ...@@ -1156,10 +1155,6 @@ module Ci
self.update(erased_by: user, erased_at: Time.current, artifacts_expire_at: nil) self.update(erased_by: user, erased_at: Time.current, artifacts_expire_at: nil)
end end
def unscoped_project
@unscoped_project ||= Project.unscoped.find_by(id: project_id)
end
def environment_url def environment_url
options&.dig(:environment, :url) || persisted_environment&.external_url options&.dig(:environment, :url) || persisted_environment&.external_url
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment