Skip to content

Commit 5922602

Browse files
committed
[Build] Provide credentials for Git LFS fetch or suppress LFS fetch
Fetching Large File Storage (LFS) objects from GitHub seems to require authentication now, even when cloning via https. For the RelEng jobs that are cloning submodules, checking out and fetching LFS objects is actually not necessary to fulfill their tasks and therefore just suppressed. Fixes #3329
1 parent 6de81fd commit 5922602

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

JenkinsJobs/Builds/build.jenkinsfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ spec:
131131
stage('Clone Repositories'){
132132
steps {
133133
dir("${CJE_ROOT}/mbscripts") {
134+
withCredentials([gitUsernamePassword(credentialsId: 'github-bot')]) { // Fetching LFS objects from GitHub requires authentication
134135
sshagent(['github-bot-ssh']) {
135136
sh '''
136137
set -eo pipefail
@@ -139,6 +140,7 @@ spec:
139140
./mb100_cloneRepos.sh $CJE_ROOT/buildproperties.shsource 2>&1 | tee $logDir/mb100_cloneRepos.sh.log
140141
'''
141142
}
143+
}
142144
}
143145
}
144146
}

JenkinsJobs/Releng/prepareNextDevCycle.jenkinsfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ pipeline {
8383
}
8484
}
8585
stage('Checkout SCM') {
86+
environment {
87+
GIT_LFS_SKIP_SMUDGE = '1' // Disable unnecessary git-lfs fetch (which also requires credentials)
88+
}
8689
steps {
8790
checkout scm
8891
script { // Always load the script from the very same state this pipeline is loaded (to ensure consistency)

JenkinsJobs/Releng/promoteBuild.jenkinsfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ pipeline {
8383
}
8484
}
8585
stage('Checkout SCM') {
86+
environment {
87+
GIT_LFS_SKIP_SMUDGE = '1' // Disable unnecessary git-lfs fetch (which also requires credentials)
88+
}
8689
steps {
8790
dir("${WORKSPACE}/repository") {
8891
checkout scm

0 commit comments

Comments
 (0)