dronevis

package module
v0.0.0-...-d75bd36 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 5 Imported by: 0

README

DroneVis

When working with a large monorepo with several build artifacts that uses a heaping spoonful of depends_on within drone it becomes hard to catch errors when writing a pipeline.

DroneVis will render your pipeline to an image graphviz style.

Installation

go get github.com/adityanatraj/dronevis

Building the binary

go build -o dronevis cmd/main.go

Usage

cat my_drone_pipeline.yml | ./dronevis

or

./dronevis <path-to-my-pipeline.yml>

Example

You can see an example pipeline in example/pipeline.yml that was rendered to the pngs for each drone condition-pathway.

note: much of the content of the steps were removed as this is a real life pipeline with (perhaps) sensitive details. The fields left out are irrelevant to processing as of today.

Contributing

This project is extremely alpha and could use help. Any and all contributions via pull request are welcome!

todos:

  • be able to the mess of variable type branches/events
  • be able to handle multiple branches as conditions
  • be able to handle multiple events as conditions
  • allow specifying where the files are saved
  • allow specifying what the output files are named
  • allow specifying the filetype of the output image
  • allow specifying the graphviz layout engine used
  • allow outputting the "dot" file directly to pipe into graphviz
  • visualize "failure" transitions
  • maybe use svg with tooltips for details

Thanks

this project wouldn't be possible without:

License

tl;dr MIT License. 2020 Aditya Natraj

Please see the attached LICENSE file.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Graph

func Graph(rdr io.Reader) (string, error)

Types

type Condition

type Condition struct {
	Branch string   `yaml:"branch"`
	Event  []string `yaml:"event"`
}

type Pipeline

type Pipeline struct {
	Name  string `yaml:"name"`
	Steps []Step `yaml:"steps"`
}

type Step

type Step struct {
	Name      string    `yaml:"name"`
	DependsOn []string  `yaml:"depends_on"`
	When      Condition `yaml:"when"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL