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

Version Path
katello-3.7.1.1 app/lib/actions/katello/content_view/promote.rb
katello-3.7.1 app/lib/actions/katello/content_view/promote.rb
katello-3.7.0 app/lib/actions/katello/content_view/promote.rb
katello-3.7.0.rc2 app/lib/actions/katello/content_view/promote.rb
katello-3.7.0.rc1 app/lib/actions/katello/content_view/promote.rb
katello-3.5.2 app/lib/actions/katello/content_view/promote.rb
katello-3.6.0 app/lib/actions/katello/content_view/promote.rb
katello-3.6.0.1.rc2 app/lib/actions/katello/content_view/promote.rb
katello-3.6.0.rc2 app/lib/actions/katello/content_view/promote.rb
katello-3.6.0.rc1 app/lib/actions/katello/content_view/promote.rb
katello-3.5.1.1 app/lib/actions/katello/content_view/promote.rb
katello-3.5.1 app/lib/actions/katello/content_view/promote.rb
katello-3.5.0.1 app/lib/actions/katello/content_view/promote.rb
katello-3.5.0 app/lib/actions/katello/content_view/promote.rb
katello-3.5.0.rc2 app/lib/actions/katello/content_view/promote.rb
katello-3.5.0.rc1 app/lib/actions/katello/content_view/promote.rb
katello-3.4.5 app/lib/actions/katello/content_view/promote.rb
katello-3.4.4 app/lib/actions/katello/content_view/promote.rb
katello-3.4.2 app/lib/actions/katello/content_view/promote.rb
katello-3.4.1 app/lib/actions/katello/content_view/promote.rb