Class: Semaph::Shells::Pipeline::PipelineShell

Inherits:
Object
  • Object
show all
Includes:
ShellShock::Context
Defined in:
lib/semaph/shells/pipeline/pipeline_shell.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(pipeline) ⇒ PipelineShell

Returns a new instance of PipelineShell.



21
22
23
24
25
26
27
28
29
# File 'lib/semaph/shells/pipeline/pipeline_shell.rb', line 21

def initialize(pipeline)
  @pipeline = pipeline
  workflow = pipeline.workflow
  project = workflow.project
  @prompt = "🏗  #{project.client.name} #{project.name} #{workflow.id} #{pipeline.yaml} > "
  add_command ::Semaph::Commands::ReloadCommand.new, "reload" if ENV["SEMAPH_RELOAD"]
  add_commands
  jobs_list_command.execute
end

Instance Attribute Details

#pipelineObject (readonly)

Returns the value of attribute pipeline.



17
18
19
# File 'lib/semaph/shells/pipeline/pipeline_shell.rb', line 17

def pipeline
  @pipeline
end