Sha256: ed3f0fd34bc8364e1d56c0c54b0ea80857e06a285c421d3dceb3907172dbdcac

Contents?: true

Size: 725 Bytes

Versions: 8

Compression:

Stored size: 725 Bytes

Contents

module Pipedream::Dsl
  module Pipeline
    include Approve
    include Codebuild
    include Github
    include Ssm

    PROPERTIES = %w[
      artifact_store
      artifact_stores
      disable_inboundstage_transitions
      name
      restart_execution_on_update
      role_arn
      stages
    ]
    PROPERTIES.each do |prop|
      define_method(prop) do |v|
        @properties[prop.to_sym] = v
      end
    end

    def stage(name, &block)
      # Reset values for each stage declaraion
      @run_order = 1

      @current_stage = {name: name, actions: []}
      @stages << @current_stage
      block.call
    end

    def action(*props)
      @current_stage[:actions] += props
      @run_order += 1
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
pipedream-0.4.7 lib/pipedream/dsl/pipeline.rb
pipedream-0.4.6 lib/pipedream/dsl/pipeline.rb
pipedream-0.4.5 lib/pipedream/dsl/pipeline.rb
pipedream-0.4.4 lib/pipedream/dsl/pipeline.rb
pipedream-0.4.3 lib/pipedream/dsl/pipeline.rb
pipedream-0.4.2 lib/pipedream/dsl/pipeline.rb
pipedream-0.4.1 lib/pipedream/dsl/pipeline.rb
pipedream-0.4.0 lib/pipedream/dsl/pipeline.rb