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

Version Path
katello-3.16.2 app/lib/actions/katello/content_view/promote.rb
katello-3.17.0.rc2.2 app/lib/actions/katello/content_view/promote.rb
katello-3.17.0.rc2.1 app/lib/actions/katello/content_view/promote.rb
katello-3.16.1.2 app/lib/actions/katello/content_view/promote.rb
katello-3.16.1.1 app/lib/actions/katello/content_view/promote.rb
katello-3.17.0.rc2 app/lib/actions/katello/content_view/promote.rb
katello-3.16.1 app/lib/actions/katello/content_view/promote.rb
katello-3.17.0.rc1 app/lib/actions/katello/content_view/promote.rb
katello-3.16.0 app/lib/actions/katello/content_view/promote.rb
katello-3.16.0.rc5.1 app/lib/actions/katello/content_view/promote.rb
katello-3.16.0.rc5 app/lib/actions/katello/content_view/promote.rb
katello-3.16.0.rc4.1 app/lib/actions/katello/content_view/promote.rb
katello-3.15.3.1 app/lib/actions/katello/content_view/promote.rb
katello-3.15.3 app/lib/actions/katello/content_view/promote.rb
katello-3.16.0.rc4 app/lib/actions/katello/content_view/promote.rb
katello-3.16.0.rc3.1 app/lib/actions/katello/content_view/promote.rb
katello-3.15.2 app/lib/actions/katello/content_view/promote.rb
katello-3.16.0.rc3 app/lib/actions/katello/content_view/promote.rb
katello-3.16.0.rc2.1 app/lib/actions/katello/content_view/promote.rb
katello-3.16.0.rc2 app/lib/actions/katello/content_view/promote.rb