Skip to content

Commit

Permalink
fix: enable long paths for git to avoid problems with tests on Window…
Browse files Browse the repository at this point in the history
…s agents (jenkins-infra#334)

Ref: jenkins-infra/helpdesk#2847
Co-authored-by: Tim Jacomb <[email protected]>
Co-authored-by: James Nord <[email protected]>
  • Loading branch information
3 people authored and lemeurherveCB committed Jun 1, 2022
1 parent b6f196a commit 2f3befa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions vars/infra.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ Object checkout(String repo = null) {
}

Object checkoutSCM(String repo = null) {
// Enable long paths to avoid problems with tests on Windows agents
if (!isUnix()) {
bat 'git config --global core.longpaths true'
}

if (env.BRANCH_NAME) {
checkout scm
} else if ((env.BRANCH_NAME == null) && (repo)) {
Expand Down

0 comments on commit 2f3befa

Please sign in to comment.