Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-26052

Fork without join

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Some flows have a need to start some long-running branches where we do not really care about waiting for termination. They might be running informational tests that would not fail the main job, or sending notifications, etc. Using parallel for these is awkward because you have to put the entire remainder of the flow in another branch, which does not nest nicely, etc.

      Suggest an alternate fork {...} which runs some stuff in the background. Could return a Future-like object you could decide to wait on later if you wished. Possibly needed parameters:

      • A label, to be used as the thread name; perhaps optional, with some generated default.
      • A daemon flag. If off, there would be an implicit join at the end of the flow. If on, if the flow reaches the end and the thread is still running, it would be stop-ped (but we probably still need to wait for it to exit cleanly).

      There should be a bounding box for the fork that runs inside so that the exit from the block is contingent on every fork inside to terminate.

      Potentially this could allow parallel to be implemented as a library.

        Attachments

          Issue Links

            Activity

            jglick Jesse Glick created issue -
            jglick Jesse Glick made changes -
            Field Original Value New Value
            Link This issue is related to JENKINS-26034 [ JENKINS-26034 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-26135 [ JENKINS-26135 ]
            jglick Jesse Glick made changes -
            Link This issue is related to JENKINS-27127 [ JENKINS-27127 ]
            rtyler R. Tyler Croy made changes -
            Workflow JNJira [ 160042 ] JNJira + In-Review [ 180228 ]
            abayer Andrew Bayer made changes -
            Component/s pipeline-general [ 21692 ]
            abayer Andrew Bayer made changes -
            Component/s workflow-plugin [ 18820 ]
            jglick Jesse Glick made changes -
            Component/s workflow-cps-plugin [ 21713 ]
            Component/s pipeline [ 21692 ]
            jglick Jesse Glick made changes -
            Link This issue is duplicated by JENKINS-36098 [ JENKINS-36098 ]

              People

              Assignee:
              kohsuke Kohsuke Kawaguchi
              Reporter:
              jglick Jesse Glick
              Votes:
              7 Vote for this issue
              Watchers:
              13 Start watching this issue

                Dates

                Created:
                Updated: