-
Notifications
You must be signed in to change notification settings - Fork 59
Control Flow
Import: (:require [lambdacd.steps.control-flow :refer :all])
All control flow steps are functions that take a set of child steps and return a build-step that executes those children in a particular manner.
Executes child-steps in parallel and waits for all of them to finish successfully. Returns success if all children return success.
(def pipeline-structure
`(;...
(in-parallel
do-something
do-something-else)))
Executes child-steps sequentially, just like they would in a normal pipeline. Can be used to group steps logically or to create sub-pipelines where normally only a single step would be expected.
(def pipeline-structure
`(;...
(in-parallel
(run do-something afterwards-do-something-else)
(run do-something2 afterwards-do-something-else2))))
Executes all child-steps in parallel and returns after one of the childs was successful Then kills all remaining children. Returns success if at least one child was successful. Often used to have multiple triggers for a pipeline.
(def pipeline-structure
`(;...
(either
wait-for-git-commit
wait-for-manual-trigger)))
Receives three children: A condition step and two steps, one of which will be executed depending on the result of condition step. Returns the success of the called branch.
(def pipeline-structure
`(;...
(junction
some-condition
step-on-success-of-condition
step-on-failure-of-condition)))