Replacement of slashes in workspace paths

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      Hello,

      When using the bitbucket-branch-source-plugin, the plugin produces the following structure in Jenkins (example):

      Jenkins
      └─ (folder) BitbucketProjectName
              β”œβ”€β”€ (folder) RepoName
              β”‚         β”œβ”€β”€ (job) aBranch
              |         └── (job) otherBranch
              ...
      

      The execution of a job produces the following workspaces:

      {JENKINS_HOME}/workspace/cketProjectName_RepoName_aBranch@libs
      {JENKINS_HOME}/workspace/ProjectName_RepoName_otherBranch@libs
      

      The resulting workspace paths are unexpected to me in multiple ways:

      1. The workspace paths are shortened
        The responsible limit which is responsible for the shortening can be found here: https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.5.6/src/main/java/jenkins/branch/WorkspaceLocatorImpl.java#L100
        The
      2. The workspace paths do not use subfolders
        The responsible method can be found here: https://github.com/jenkinsci/branch-api-plugin/blob/branch-api-2.5.6/src/main/java/jenkins/branch/WorkspaceLocatorImpl.java#L360

      My issues with the observed behavior:
      Usually jobs in folders produce workspaces like {JENKINS_HOME}/workspace/aFolder/aSubFolder/aJob@libs. Why does the branch-api-plugin produce workspaces in a different way ?
      More precisely, why does the branch-api-plugin replace the slashes `/` with underscores `_` ?

      If the slashes were not replaced, the resulting workspace paths would simply leverage subfolders like other jobs in folders. So I wonder: Is this behavior really intended, or is this a bug ?

            Assignee:
            Nikolas Falco
            Reporter:
            Stefan HΓΆlzle
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: