-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
OpenJDK 11.0.6
Jenkins 2.235.1
branch-api 2.5.6
cloudbees-bitbucket-branch-source 2.8.0
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:
- 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 - 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 ?