Class: Pipely::Actions::GraphLivePipeline
- Inherits:
-
Object
- Object
- Pipely::Actions::GraphLivePipeline
- Defined in:
- lib/pipely/actions/graph_live_pipeline.rb
Overview
Graph a deployed pipeline with live execution statuses.
Instance Method Summary collapse
- #execute ⇒ Object
-
#initialize(options) ⇒ GraphLivePipeline
constructor
A new instance of GraphLivePipeline.
Constructor Details
#initialize(options) ⇒ GraphLivePipeline
8 9 10 |
# File 'lib/pipely/actions/graph_live_pipeline.rb', line 8 def initialize() = end |
Instance Method Details
#execute ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/pipely/actions/graph_live_pipeline.rb', line 12 def execute live_pipeline = Pipely::LivePipeline.new(.pipeline_id) live_pipeline.print_runs_report outfile = if .latest_run live_pipeline.render_latest_graph(.output_path) else live_pipeline.render_graphs(.output_path) end if .json_output $stdout.puts({ :graph => outfile }.to_json) elsif $stdout.tty? $stdout.puts "Generated #{outfile}" else $stdout.puts outfile end end |