Sha256: 56e433d1aab7bd405e7f124f330033569abf307d3f48b14b6e6608a0c7425ea6
Contents?: true
Size: 1.05 KB
Versions: 21
Compression:
Stored size: 1.05 KB
Contents
module Actions module Katello module ContentView class Promote < Actions::EntryAction def plan(version, environments, is_force = false, description = nil, incremental_update = false) 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, incremental_update) plan_action(Katello::ContentViewVersion::AfterPromoteHook, :id => version.id) end end end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems