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

Workspace directory names mangled in multibranch pipeline

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Apparently after a recent update of plugins, our Multibranch Pipeline jobs started putting their workspaces in mangled locations. They used to be, for example, in D:\jenkins\cm-jenkins-09\my-pipline-job\my-branch-name and now they're like D:\jenkins\cm-jenkins-09\ine-job_my-banch-name-5P5URKHPJXWGGVIWDQOJBB3N7RJECAQJGFTDCVOPY3PABO7LNTIQ

      There are several problems with this:

      1. They're difficult to read with all that garbage at the end, and the beginning of the name sometimes cut off
      2. They're not organized within the parent job like they used to be
      3. This is causing files within them to have extremely long paths such that Windows won't actually let us delete them (Jenkins, CMD, and Windows Explorer all fail to delete them)

      Let me know if I can provide any other information to help solve this. This is a private Jenkins install so I can't point you to it.

        Attachments

          Issue Links

            Activity

            Hide
            kpop kpop added a comment - - edited

            Removing the 'garbage' at the end causes name clashes (cf. JENKINS-54640). (edit: fixed issue link)

            Show
            kpop kpop added a comment - - edited Removing the 'garbage' at the end causes name clashes (cf. JENKINS-54640 ). (edit: fixed issue link)
            Hide
            godskalk Øyvind R added a comment -

            kpop, there is no way you need over 50 base-64 characters to avoid name clashes. Git manages with just 7 hex-characters for thousands of commits.

            Show
            godskalk Øyvind R added a comment - kpop , there is no way you need over 50 base-64 characters to avoid name clashes. Git manages with just 7 hex-characters for thousands of commits.
            Hide
            kpop kpop added a comment -

            Øyvind R, I agree: less is certainly better, but name clashes should be avoided.

            Show
            kpop kpop added a comment - Øyvind R , I agree: less is certainly better, but name clashes should be avoided.
            Hide
            sdbates sascha bates added a comment -

            My workaround for this was to define a jobName and then use the jobName in the workspace. The jobName var was also to account for feature branches and builds around several different microservices that might also have the same Jira id attached to them.

            Our feature branch work is all short lived and named feature/jira-12345-some-description. Our services are named my-service-name. The below lines result in a 'my-service-name-jira-12345' workspace name. 99% of the time we don't need to look at workspaces anyway, but this makes the console log readable as well as making it possible to write directory cleanup patterns based on naming.
             
             
             
            def jobName = JOB_NAME.replaceAll(/\/\w+%2F/,'-').toLowerCase()
            ansiColor( 'xterm' ) {
              timestamps {try {node() {
                ws( "workspace/${jobName}" ) {
                  stage( 'Pull Github Repository' ) {
             

            Show
            sdbates sascha bates added a comment - My workaround for this was to define a jobName and then use the jobName in the workspace. The jobName var was also to account for feature branches and builds around several different microservices that might also have the same Jira id attached to them. Our feature branch work is all short lived and named feature/jira-12345-some-description. Our services are named my-service-name. The below lines result in a 'my-service-name-jira-12345' workspace name. 99% of the time we don't need to look at workspaces anyway, but this makes the console log readable as well as making it possible to write directory cleanup patterns based on naming.       def jobName = JOB_NAME.replaceAll(/\/\w+%2F/,'-').toLowerCase() ansiColor( 'xterm' ) {   timestamps { try { node() {     ws( "workspace/${jobName}" ) {       stage( 'Pull Github Repository' ) {  
            Hide
            jglick Jesse Glick added a comment -

            This issue became obsolete with the release of the fix of JENKINS-2111.

            Show
            jglick Jesse Glick added a comment - This issue became obsolete with the release of the fix of JENKINS-2111 .

              People

              • Assignee:
                Unassigned
                Reporter:
                tyrelh Tyrel Haveman
              • Votes:
                76 Vote for this issue
                Watchers:
                100 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: