-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
-
git plugin 4.5.0
The git pipeline steps documentation states that it checks out the default branch if none is specified:
This doesn't seem to be true, as a repo without master branch will cause the error:
... [Pipeline] { [Pipeline] git using credential credentialId Cloning the remote Git repository remote: Enumerating objects remote: Counting objects remote: Compressing objects Receiving objects Resolving deltas [Pipeline] } [Pipeline] // dir [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Affected pipeline snippet:
git credentialsId: 'credentialId', url: 'https://github.com/orgname/reponame'
This worked:
git credentialsId: 'credentialId', url: 'https://github.com/orgname/reponame', branch: 'default-branchname-specified-explicitly'
- links to