Sha256: debcf1d4b97d196f526394529b4c5ecc306cd2f6e30ab389efc71bebe16b2097

Contents?: true

Size: 1.03 KB

Versions: 13

Compression:

Stored size: 1.03 KB

Contents

require 'ruby_fly'
require 'rake_factory'

module RakeFly
  module Tasks
    class PushPipeline < RakeFactory::Task
      default_name :push_pipeline
      default_description RakeFactory::DynamicValue.new { |t|
        pipeline = t.pipeline || '<derived>'
        target = t.target || '<derived>'

        "Push pipeline #{pipeline} to target #{target}"
      }

      parameter :target, :required => true
      parameter :pipeline, :required => true

      parameter :get_pipeline_task_name, :default => :get_pipeline
      parameter :set_pipeline_task_name, :default => :set_pipeline
      parameter :unpause_pipeline_task_name, :default => :unpause_pipeline

      action do |t, args|
        [
            Rake::Task[t.scope.path_with_task_name(t.set_pipeline_task_name)],
            Rake::Task[t.scope.path_with_task_name(t.get_pipeline_task_name)],
            Rake::Task[t.scope.path_with_task_name(
                t.unpause_pipeline_task_name)]
        ].each do |task|
          task.invoke(*args)
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
rake_fly-1.17.0 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.16.0.pre.1 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.15.0 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.14.0.pre.1 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.13.0 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.12.0.pre.2 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.12.0.pre.1 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.11.0 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.10.0.pre.1 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.9.0 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.8.0.pre.1 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.7.0 lib/rake_fly/tasks/push_pipeline.rb
rake_fly-1.6.0.pre.1 lib/rake_fly/tasks/push_pipeline.rb