Sha256: 9782499fccc8c3b22c22b1564145bbd023cacba73450f472fcf5f6ebcb03d450

Contents?: true

Size: 682 Bytes

Versions: 11

Compression:

Stored size: 682 Bytes

Contents

namespace :foreman_scc_manager do
  desc 'Republish all SCC-repositories.'
  task :republish_scc_repositories => ['dynflow:client', 'katello:check_ping'] do
    needing_publish = SccKatelloRepository.joins(:katello_root_repository)
                                          .joins(:katello_root_repository => :repositories)
                                          .pluck("#{Katello::Repository.table_name}.id")
    if needing_publish.any?
      ForemanTasks.async_task(::Actions::Katello::Repository::BulkMetadataGenerate, Katello::Repository.where(:id => needing_publish))
    else
      puts 'Skipped. No repository found which was created by the SCC plugin.'
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
foreman_scc_manager-4.0.0 lib/tasks/republish_repositories.rake
foreman_scc_manager-3.1.1 lib/tasks/republish_repositories.rake
foreman_scc_manager-3.1.0 lib/tasks/republish_repositories.rake
foreman_scc_manager-3.0.0 lib/tasks/republish_repositories.rake
foreman_scc_manager-2.3.0 lib/tasks/republish_repositories.rake
foreman_scc_manager-2.2.3 lib/tasks/republish_repositories.rake
foreman_scc_manager-2.2.2 lib/tasks/republish_repositories.rake
foreman_scc_manager-2.2.1 lib/tasks/republish_repositories.rake
foreman_scc_manager-2.2.0 lib/tasks/republish_repositories.rake
foreman_scc_manager-2.1.0 lib/tasks/republish_repositories.rake
foreman_scc_manager-2.0.0 lib/tasks/republish_repositories.rake