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

Version Path
katello-3.18.5 app/lib/actions/katello/content_view/promote.rb
katello-3.18.4 app/lib/actions/katello/content_view/promote.rb
katello-3.18.3.1 app/lib/actions/katello/content_view/promote.rb
katello-3.18.3 app/lib/actions/katello/content_view/promote.rb
katello-4.0.0 app/lib/actions/katello/content_view/promote.rb
katello-4.0.0.rc3.1 app/lib/actions/katello/content_view/promote.rb
katello-4.0.0.rc3 app/lib/actions/katello/content_view/promote.rb
katello-3.18.2.1 app/lib/actions/katello/content_view/promote.rb
katello-3.18.2 app/lib/actions/katello/content_view/promote.rb
katello-3.17.3 app/lib/actions/katello/content_view/promote.rb
katello-4.0.0.rc2 app/lib/actions/katello/content_view/promote.rb
katello-3.18.1.1 app/lib/actions/katello/content_view/promote.rb
katello-3.17.2 app/lib/actions/katello/content_view/promote.rb
katello-4.0.0.rc1 app/lib/actions/katello/content_view/promote.rb
katello-3.18.1 app/lib/actions/katello/content_view/promote.rb
katello-3.18.0 app/lib/actions/katello/content_view/promote.rb
katello-3.17.1 app/lib/actions/katello/content_view/promote.rb
katello-3.18.0.rc2.1 app/lib/actions/katello/content_view/promote.rb
katello-3.18.0.rc2 app/lib/actions/katello/content_view/promote.rb
katello-3.17.0 app/lib/actions/katello/content_view/promote.rb