Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Clone repo with all history and all tags
Intentional changes from JENKINS-43507 have reduced server load, disc use, and data transfer by honor the refspec which matches the branch of the job being built in a multi-branch pipeline, and by not fetching tags. Unfortunately, this branch contains tests which assume it is operating with a complete clone of the repository, including all tags and all branches. The tests have been fixed on the master branch, but not on this branch. Rather than fix the tests on this branch (with the risk that creates), this change modifies the clone to include all history and all tags.
- Loading branch information
5cff403
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We solved this by doing
5cff403
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@betrcode that step will work for linux agents, and for repositories that are publicly accessible.
It won't work for windows agents, and won't work for repositories which require authentication (unless the sh step is wrapped in a withCredentials)