jenkinsci / jenkinsci/git-plugin
[JENKINS-30339] Expand variables in Freestyle job 'local subdirectory' field
- Dominant language
- Java
- Stars
- 694
- Forks
- 1.1k
- Avg merge
- 1h 29m
- Merged PRs (30d)
- 3
Description
I wanted to see where, when and how I could make use of GIT_BRANCH in a job that tracks multiple branches. Branch specifier is set to 'origin/topic/*', which matches two branches - 'parallel_1' and 'parallel_2'. In the additional behaviors section, I specified '${GIT_BRANCH}' as local subdirectory for repo.
I start the job manually and it triggers two builds - one for each matching branch. However, my workspace contains two directories called '${GIT_BRANCH}' (from build #1 for parallel_1 branch) and 'parallel_1' (from build #2 for parallel_2 branch).
I would expect GIT_BRANCH to be used consistently - either correctly all the time or never.
---
Originally reported by
tba, imported from: Expand variables in Freestyle job 'local subdirectory' field
Raw content of original issue
I wanted to see where, when and how I could make use of GIT_BRANCH in a job that tracks multiple branches. Branch specifier is set to 'origin/topic/*', which matches two branches - 'parallel_1' and 'parallel_2'. In the additional behaviors section, I specified '${GIT_BRANCH}' as local subdirectory for repo.
I start the job manually and it triggers two builds - one for each matching branch. However, my workspace contains two directories called '${GIT_BRANCH}' (from build #1 for parallel_1 branch) and 'parallel_1' (from build #2 for parallel_2 branch).
I would expect GIT_BRANCH to be used consistently - either correctly all the time or never.
environment
```
Jenkins 1.609.3
GIT plugin 2.4.0
GIT client plugin 1.19.0
```
Contributor guide
Assessment
This issue has not been assessed yet.