lambdacd.presentation.pipeline-structure
This namespace is responsible for converting the pipeline into a nice map-format that we can use to display the pipeline in a UI
flatten-pipeline-representation
(flatten-pipeline-representation reps)
Takes a pipeline-representation as returned by pipeline-display-representation
(which is hierarchical, containing only representations for the root-steps which then contain the representation of their children) and returns a collection of pipeline representations, this time containing all child steps as well.
pipeline-display-representation
(pipeline-display-representation part)
Takes a pipeline-structure and returns a nested list of step representations (i.e. the result of step-display-representation
):
> (pipeline-display-representation `((in-parallel
(in-cwd "foo"
do-stuff)
(in-cwd "bar"
do-other-stuff)))
[{:name "in-parallel"
:type :parallel
:step-id '(1)
:has-dependencies false
:children
[{:name "in-cwd foo"
:type :container
:step-id '(1 1)
:has-dependencies false
:children [{:name "do-stuff" :type :step :step-id '(1 1 1) :has-dependencies false}]}
{:name "in-cwd bar"
:type :container
:step-id '(2 1)
:has-dependencies false
:children [{:name "do-other-stuff" :type :step :step-id '(1 2 1) :has-dependencies true}]}]}]
step-display-representation
(step-display-representation part id)
Takes a part of a pipeline and its step-id and returns a map-representation with data about this part of the pipeline:
> (step-display-representation `do-stuff `(1)])
{:name "do-stuff" :type :step :step-id '(1) :has-dependencies false}
step-display-representation-by-step-id
(step-display-representation-by-step-id pipeline-def step-id)
Returns a information about step (as returned by step-display-representation
) for a specific step (identified by a step-id) in a pipeline:
> (step-display-representation-by-step-id `(do-stuff
do-other-stuff
do-stuff-that-has-a-different-display-type) `(1))
{:name "do-stuff" :type :step :step-id '(1) :has-dependencies false}
step-display-representation-internal
deprecated in 0.13.1
(step-display-representation-internal part id include-alias?)
DEPRECATED