summaryrefslogtreecommitdiff
path: root/app/models/deployment.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/deployment.rb')
-rw-r--r--app/models/deployment.rb21
1 files changed, 3 insertions, 18 deletions
diff --git a/app/models/deployment.rb b/app/models/deployment.rb
index dafcbc593be..20841bc14cd 100644
--- a/app/models/deployment.rb
+++ b/app/models/deployment.rb
@@ -105,6 +105,7 @@ class Deployment < ApplicationRecord
after_transition any => :running do |deployment|
next unless deployment.project.ci_forward_deployment_enabled?
+ next if Feature.enabled?(:prevent_outdated_deployment_jobs, deployment.project)
deployment.run_after_commit do
Deployments::DropOlderDeploymentsWorker.perform_async(id)
@@ -282,27 +283,11 @@ class Deployment < ApplicationRecord
end
def manual_actions
- environment_manual_actions
- end
-
- def other_manual_actions
- @other_manual_actions ||= deployable.try(:other_manual_actions)
- end
-
- def environment_manual_actions
- @environment_manual_actions ||= deployable.try(:environment_manual_actions)
+ @manual_actions ||= deployable.try(:other_manual_actions)
end
def scheduled_actions
- environment_scheduled_actions
- end
-
- def environment_scheduled_actions
- @environment_scheduled_actions ||= deployable.try(:environment_scheduled_actions)
- end
-
- def other_scheduled_actions
- @other_scheduled_actions ||= deployable.try(:other_scheduled_actions)
+ @scheduled_actions ||= deployable.try(:other_scheduled_actions)
end
def playable_build