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.

          [JENKINS-36358] ws step does not lock the workspace

          Jesse Glick added a comment -

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

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

            jglick Jesse Glick
            jglick Jesse Glick
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: