Sha256: 611b164bdf427b4c312ca0a6223dc85b550fb71a2a2c23ccbd86bc48421f2c80
Contents?: true
Size: 1.01 KB
Versions: 60
Compression:
Stored size: 1.01 KB
Contents
module Actions module Katello module ContentView class Promote < Actions::EntryAction def plan(version, environments, is_force = false, description = nil) action_subject(version.content_view) version.check_ready_to_promote!(environments) fail ::Katello::HttpErrors::BadRequest, _("Cannot promote environment out of sequence. Use force to bypass restriction.") if !is_force && !version.promotable?(environments) # Pass the environments as input in order to make them accessible to UI alerts plan_self(environments: environments.map(&:name)) environments.each do |environment| sequence do plan_action(Katello::ContentViewVersion::BeforePromoteHook, :id => version.id) plan_action(ContentView::PromoteToEnvironment, version, environment, description) plan_action(Katello::ContentViewVersion::AfterPromoteHook, :id => version.id) end end end end end end end
Version data entries
60 entries across 60 versions & 1 rubygems