Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add graph subcommand #20

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Add graph subcommand #20

wants to merge 2 commits into from

Conversation

himanoa
Copy link

@himanoa himanoa commented Aug 20, 2021

What

Implemented graph subcommand.

See. #12

How to check operation

  1. Run echo "pipeline{ agent any stages { stage('Build') { steps { sh 'printenv' }} stage('Test') { steps { sh 'cargo test' } } stage('Publish') { steps { sh 'cargo publish' } } }}" > Jenkinsfile
  2. Run cargo run -q -- graph ./Jenkinsfile | dot -Tpng > pipeline.png

@himanoa himanoa changed the title Add graph option Add graph subcommand Aug 20, 2021
@himanoa
Copy link
Author

himanoa commented Aug 22, 2021

@rtyler Would you mind if I ask you to review the pull-request?

format!(r#"digraph {{ {} }}"#, nodes)
}

fn stage_graphs(buffer: &str) -> Result<Vec<&str>, PestError<Rule>> {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@himanoa how does this work with a set of parallel stages? I can easily imagine what the dot syntax looks like for those ,but I'm not quite understanding how that might look with a flat Vec here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants