I have a fairly heavy collection of pipelines where it might be handy to conditionally apply the failFast flag in a parallel stage. I'm starting to develop a two-phase design for pull request builds, where a lighter build is performed at the early stage of development and the full build runs once things are more complete. I'm achieving this using PR labels, and I'm selecting a small subset of just the most important parallel branches for the light build. This is in order to reduce usage of a limited pool of build agents.

       

      Allowing an expression in the failFast flag, similar (or maybe identical?) to the `when`  directive on stages, would enhance this idea. That way, a full build would run each parallel branch to completion but a light build would get out of the way quickly while there is a lot of developmental churn. I tried using a boolean expression in the failFast flag but it seems to only accept a hard true or false.

          [JENKINS-52158] Conditional parallel failfast

          Andrew Bayer added a comment -

          Interesting. I'll think on it.

          Andrew Bayer added a comment - Interesting. I'll think on it.

          Did anything come of this idea?  It's something we'd like to see also.

          Brian J Murrell added a comment - Did anything come of this idea?  It's something we'd like to see also.

          Fabian Holler added a comment - - edited

          We also need this.
          Allowing to pass `failFast` as a boolean parameter to parallel() would also be an option.

          Fabian Holler added a comment - - edited We also need this. Allowing to pass `failFast` as a boolean parameter to parallel() would also be an option.

          Tobias Geyer added a comment -

          +1 on this being needed.

          We want to enable / disable "failFast" depending on a build parameter

          Tobias Geyer added a comment - +1 on this being needed. We want to enable / disable "failFast" depending on a build parameter

          Tom added a comment -

          It would be nice to have this feature for our build pipeline. Therefore, upvoting this issue. 

          Tom added a comment - It would be nice to have this feature for our build pipeline. Therefore, upvoting this issue. 

            Unassigned Unassigned
            stevenfoster Steven Foster
            Votes:
            4 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: