2021-04-13 09:11:10 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
module BulkImports
|
|
|
|
class Stage
|
|
|
|
def self.pipelines
|
2021-09-13 09:11:26 +00:00
|
|
|
new.pipelines
|
2021-04-13 09:11:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def pipelines
|
|
|
|
@pipelines ||= config
|
|
|
|
.values
|
|
|
|
.sort_by { |entry| entry[:stage] }
|
|
|
|
.map do |entry|
|
|
|
|
[entry[:stage], entry[:pipeline]]
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def config
|
2021-09-13 09:11:26 +00:00
|
|
|
# To be implemented in a sub-class
|
|
|
|
NotImplementedError
|
2021-04-13 09:11:10 +00:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|