Module: Pipedream::Dsl::Pipeline

Includes:
Approve, Codebuild, Github, Ssm
Included in:
Pipeline
Defined in:
lib/pipedream/dsl/pipeline.rb,
lib/pipedream/dsl/pipeline/github.rb,
lib/pipedream/dsl/pipeline/approve.rb,
lib/pipedream/dsl/pipeline/codebuild.rb

Defined Under Namespace

Modules: Approve, Codebuild, Github

Constant Summary collapse

PROPERTIES =
%w[
  artifact_store
  artifact_stores
  disable_inboundstage_transitions
  input_artifacts
  name
  restart_execution_on_update
  role_arn
  stages
]

Instance Method Summary collapse

Methods included from Ssm

#ssm, #ssm_client

Methods included from Github

#extract_repo_source, #github

Methods included from Codebuild

#codebuild

Methods included from Approve

#approve

Instance Method Details

#action(*props) ⇒ Object



43
44
45
46
# File 'lib/pipedream/dsl/pipeline.rb', line 43

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

#in_parallelObject



37
38
39
40
41
# File 'lib/pipedream/dsl/pipeline.rb', line 37

def in_parallel
  @in_parallel = true
  yield
  @in_parallel = false
end

#pipeline_nameObject



24
25
26
# File 'lib/pipedream/dsl/pipeline.rb', line 24

def pipeline_name
  @options[:pipeline_name]
end

#stage(name, &block) ⇒ Object



28
29
30
31
32
33
34
35
# File 'lib/pipedream/dsl/pipeline.rb', line 28

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

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