| The ability to skip multiple stages for a single input result will come along as part of JENKINS-46809 - the architecture makes it not viable to have something that happens in a stage (input, environment, etc) actually carry over as an environment variable to other sibling stages, but sequential nested stages will let you say "here's a parent stage with an input and a when - if the when passes, run this list of other stages". Ordering is hard. =) I made the call that there was more value in having the result of input available for when than avoiding the input directive if an unrelated when condition was false. It was either input and then when in evaluation order, or when and then input, so...yeah. Again, once JENKINS-46809 lands, you could do a "parent" stage with the branch when condition, with a single nested stage with the input-based when condition. Not the most elegant syntax, sure, but trade-offs have to be made in order to have the opinionated behavior and structure Declarative provides. |