[JENKINS-64406] Expand environment variables when performing lightweight-checkout #1062
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JENKINS-64406 - Expand environment variable to perform lightweight-checkout for Pipeline script from SCM using single branch
When performing a lightweight-checkout for
Pipeline script from SCM
using a global environment variable with a single branch, would lead to an error as the environment variable support was not provided in thesupports(SCM source)
method ofGitSCMFileSystem
class. This PR focuses on providing environment variable support for a single branch build only. For multiple branches a full-checkout is performed and seems more rational for now.Checklist
Types of changes
Further comments
Although the environment variable support could also be provided in
build(Item owner, SCM scm, jenkins.scm.api.SCMRevision rev)
method as well but then the branch name has to be checked against the issue JENKINS-57587 again and other match cases, defeating the purpose of supports(SCM source)
method.