jenkinsci / jenkinsci/durable-task-plugin
[JENKINS-45303] Slashes in branch names cause 'bat' task error
- Dominant language
- Java
- Stars
- 30
- Forks
- 101
- PR merge metrics
- No merged PRs in 30d
Description
On windows, when we use '/' on branch name, it was replaced by %2F on the workspace path. On 'bat' task, the %2 will be replace with the 3rd element of the command.
Exemple :
- Branch name : 'release/4.0.0'
- JenkinsFile command : bat 'mvn integration-test sonar:sonar'
- The workspace path :
D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\release%2F4.0.0
- The error :
[ERROR] Could not create local repository at D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\releasesonar:sonarF4.0.0@2\.repository2 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] [http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException]
---
Originally reported by bokc, imported from: Slashes in branch names cause 'bat' task error
Raw content of original issue
On windows, when we use '/' on branch name, it was replaced by %2F on the workspace path. On 'bat' task, the %2 will be replace with the 3rd element of the command.
Exemple :
- Branch name : 'release/4.0.0'
- JenkinsFile command : bat 'mvn integration-test sonar:sonar'
- The workspace path :
D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\release%2F4.0.0
- The error :
[ERROR] Could not create local repository at D:\Jenkins\Slave\workspace\Artemis\artemis-angular\artemis-model\releasesonar:sonarF4.0.0@2\.repository2 -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] [http://cwiki.apache.org/confluence/display/MAVEN/LocalRepositoryNotAccessibleException]
environment
```
Jenkins 2.68
Durable-task-plugin : 1.14
```
Contributor guide
Assessment
This issue has not been assessed yet.