Currently, Pipelines only allows appending stages. This creates a limitation in usability. For example, we have a general purpose construct that defines a pipeline for code library builds. The current pipeline has two stages: build and release. We wish to implement a method .addTest(...), which will conditionally "inject" another stage between "build" and "release" only if it's called. If there are no tests, there should still be two stages.
Maybe we can do something like new Stage(pipeline, 'Bla', { insertBefore: someOtherStage }).