Sha256: 90565c8fafaaf01f58a2772278358c87e3eee01fae1121b4483be8fa263968b9

Contents?: true

Size: 970 Bytes

Versions: 16

Compression:

Stored size: 970 Bytes

Contents

# frozen_string_literal: true

require 'ruby_fly'
require 'rake_factory'

module RakeFly
  module Tasks
    module Pipeline
      class Push < RakeFactory::Task
        default_name :push
        default_description(RakeFactory::DynamicValue.new do |t|
          pipeline = t.pipeline || '<derived>'
          target = t.target || '<derived>'

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

        parameter :target, required: true
        parameter :pipeline, required: true

        parameter :get_task_name, default: :get
        parameter :set_task_name, default: :set
        parameter :unpause_task_name, default: :unpause

        action do |t, args|
          [
            t.application[t.set_task_name, t.scope],
            t.application[t.get_task_name, t.scope],
            t.application[t.unpause_task_name, t.scope]
          ].each do |task|
            task.invoke(*args)
          end
        end
      end
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
rake_fly-2.16.0.pre.2 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.16.0.pre.1 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.15.0 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.14.0.pre.7 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.14.0.pre.6 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.14.0.pre.5 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.14.0.pre.4 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.14.0.pre.3 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.14.0.pre.2 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.14.0.pre.1 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.13.0 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.12.0.pre.2 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.12.0.pre.1 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.11.0 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.10.0.pre.4 lib/rake_fly/tasks/pipeline/push.rb
rake_fly-2.10.0.pre.3 lib/rake_fly/tasks/pipeline/push.rb