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

ws step does not lock the workspace

    XMLWordPrintable

Details

    Description

      Currently WorkspaceStepExecution just calls WorkspaceList.allocate. If there is some other build/thread using the designated workspace, it will simply append @2 etc.

      Better would be to have an option to call acquire, which would pause until the workspace is released and then acquire an exclusive lock. Unfortunately this would block the CPS VM thread and not survive restarts. Could force the exact path to be acquired only by setting up a background thread (with onResume) to block, or adding a core API to register a callback listener when any existing lease is released.

      Attachments

        Issue Links

          Activity

            jglick Jesse Glick added a comment -

            If implemented, could offer a Pipeline alternative to the Batch Task plugin.

            jglick Jesse Glick added a comment - If implemented, could offer a Pipeline alternative to the Batch Task plugin.

            People

              jglick Jesse Glick
              jglick Jesse Glick
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated: