rtyler/jdp

Add a `graph` subcommand to the CLI to visualize stage progression

Opened this issue · 2 comments

Now that the parser is already having to inspect each stage for correctness, it shouldn't be too much surgery to add a graph subcommand that either prints a stage graph in the CLI or outputs dot format for graphing with Graphviz, e.g.

+-----+     +------+     +--------+
|Build+---> | Test +---> | Deploy |
+-----+     +------+     +--------+

(handling nested stages and parallel obviously, thus the suggestion to just output dot format)

It would be nice if I could pipe this, e.g. jdp graph Jenkinsfile | dot -o pipeline.png

May I try this?

@himanoa try to implement it? Go for it 😄