step-result-updated, but I do not think it will help me achieve what I want. Any help on this will be appreciated.
@flosell , I was working on the slack integration and here is the approach I am taking:-
pipeline-contextas a parameter
I see that there is a
pipeline-context. But, how can I calculate overall build status?
Sounds like a good approach.
(lambdacd.internal.pipeline-state/get-all pipeline-state-component) should give you the complete state. That's a map of build-numbers to state of the build (which again is a map of step-ids to step-results).
lambdacd.presentation.pipeline-state/overall-build-status should give you the overall status of a build (that's what's being used by the build-history you see in the UI). So
(pipeline-state-presentation/overall-build-status (get (pipeline-state/get-all pipeline-state-component) build-number) should give you what you need (haven't tested it though). If you need more details, I'd start by looking at how the history API endpoint is implemented (https://github.com/flosell/lambdacd/blob/master/src/clj/lambdacd/ui/api.clj#L29) and going from there