I have a project with a Jenkinsfile that changes a number of stages depending on whether it's a normal build, a nightly build, or a pull-request build.
As such, it's quite difficult therefore to declare which stages can be run in parallel, as in some cases it's not clear there's anything 'parallel' to be done or - worse - there is work that could be going on in parallel that is stoppped because it's in a different 'parallel' block. I'm ending up hacking the Jenkinsfile 'parallel' declarations to try to get the maximum degree of parallelism (nee - shortest build time)
What I really want to be able to do is say "here's a stage, and it can be run when <this condition> is satisfied, but get on with everything else until it's ready. I.E: a pause, asynchronous task.
Is there any good idea for things like this?