taskgraph

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintAllGraphs added in v0.2.0

func PrintAllGraphs(graphs []*TaskGraph, outputFormat string, withTaskRef bool) error

Function that prints graph to stdout

func WriteAllGraphs added in v0.2.0

func WriteAllGraphs(graphs []*TaskGraph, outputFormat string, outputDir string, withTaskRef bool) error

Function that writes graph to file

Types

type TaskGraph

type TaskGraph struct {
	PipelineName string
	Nodes        map[string]*TaskNode
}

func BuildTaskGraph

func BuildTaskGraph(tasks []v1pipeline.PipelineTask) *TaskGraph

In the case where the order of tasks is arbitrary, it is necessary to create all the nodes first and then add the dependencies in a separate loop (since dependencies doesn't exist in TaskRef). BuildTaskGraph creates a TaskGraph from a list of PipelineTasks

func (*TaskGraph) ToDOT

func (g *TaskGraph) ToDOT(withTaskRef bool) (string, error)

func (*TaskGraph) ToMermaid

func (g *TaskGraph) ToMermaid(withTaskRef bool) (string, error)

func (*TaskGraph) ToPlantUML

func (g *TaskGraph) ToPlantUML(withTaskRef bool) (string, error)

type TaskNode

type TaskNode struct {
	Name         string
	TaskRefName  string // Name of the kind: Task referenced by this task in the pipeline
	Dependencies []*TaskNode
	IsRoot       bool // Flag to indicate the the node is the root of the graph
}

Jump to

Keyboard shortcuts

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