Sha256: b5aff14ba18439255eded400ece932c38499f3b59193381f8c93018373d4985e
Contents?: true
Size: 983 Bytes
Versions: 24
Compression:
Stored size: 983 Bytes
Contents
module Actions module Katello module ContentView class Promote < Actions::EntryAction middleware.use Actions::Middleware::KeepCurrentUser def plan(version, environments, is_force = false, description = nil, options = {}) 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| plan_action(ContentView::PromoteToEnvironment, version, environment, description, :force_yum_metadata_regeneration => options[:force_yum_metadata_regeneration]) end end end end end end
Version data entries
24 entries across 24 versions & 1 rubygems