Sha256: 0f9e138de974ea4f2cee8e1a0854ce146f767b3ce0310cb59029a455a7fa8392

Contents?: true

Size: 893 Bytes

Versions: 18

Compression:

Stored size: 893 Bytes

Contents

load "#{Katello::Engine.root}/lib/katello/tasks/common.rake"

namespace :katello do
  desc "Runs a Pulp 2 to 3 Content Migration for supported types.  May be run multiple times.  Use wait=false to immediately return with a task url."
  task :pulp3_migration => ["environment", "disable_dynflow", "check_ping"] do
    task = ForemanTasks.async_task(Actions::Pulp3::ContentMigration)

    if ENV['wait'].nil? || ::Foreman::Cast.to_bool(ENV['wait'])
      until !task.pending? || task.paused?
        sleep(20)
        task = ForemanTasks::Task.find(task.id)
      end

      if task.result == 'error' || task.result == 'pending'
        fail ForemanTasks::TaskError, task
      else
        puts _("Content Migration completed successfully")
      end
    else
      puts "Migration started, you may monitor it at: https://#{Socket.gethostname}/foreman_tasks/tasks/#{task.id}"
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
katello-3.16.2 lib/katello/tasks/pulp3_migration.rake
katello-3.16.1.2 lib/katello/tasks/pulp3_migration.rake
katello-3.16.1.1 lib/katello/tasks/pulp3_migration.rake
katello-3.16.1 lib/katello/tasks/pulp3_migration.rake
katello-3.17.0.rc1 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc5.1 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc5 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc4.1 lib/katello/tasks/pulp3_migration.rake
katello-3.15.3.1 lib/katello/tasks/pulp3_migration.rake
katello-3.15.3 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc4 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc3.1 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc3 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc2.1 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc2 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc1.1 lib/katello/tasks/pulp3_migration.rake
katello-3.16.0.rc1 lib/katello/tasks/pulp3_migration.rake