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

When using custom workspaces determined by parameters, delete workspace does not delete the directory to be used in this build

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None
    • Server: 3.2.63-2+deb7u1 x86_64
      Slave: OS X Yosemite
      Jenkins LTS 1.596.1
      Running directly
      Installed via deb
      SSH slave connections
      Chrome, 45.0.2454.85 m

      I have a job setup that sets a custom workspace, the name of which is dependent on job parameters:

      Use custom workspace:

      /jenkins/slave/workspace/${JOB_NAME}${DEPOT}${PLATFORM}

      where DEPOT and PLATFORM are choice parameters.

      This job is often run twice in succession, once for one value of PLATFORM and right after for another value.

      When the job is run and the "Delete workspace before build starts" box is checked, it deletes the workspace from the previous iteration of the job, rather than the previous iteration of the job that had the same parameters.

      Example:

      if the job is being run with a workspace of:

      /jenkins/slave/workspace/My_Job_dev_ios

      instead of deleting that directory so it's fresh for that iteration, it deletes

      /jenkins/slave/workspace/My_Job_dev_android

      as that's what the previous build had as parameters.

      I verified this behavior by looking at the folders on the build node (jobs were executing consistently on the same node) and see what was deleted.

            Unassigned Unassigned
            thargreaves_rhi Tim Hargreaves
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: