improve checkout performance
refs DE-339 Change-Id: Ib921d5f54d0a582a2fe7cf550de4c71d4bcd46a0 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/250693 Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com> QA-Review: Aaron Ogata <aogata@instructure.com> Product-Review: Aaron Ogata <aogata@instructure.com> Reviewed-by: James Butters <jbutters@instructure.com>
This commit is contained in:
parent
eaa56c4fa7
commit
b061e8518b
|
@ -333,24 +333,22 @@ pipeline {
|
|||
sh 'ls -A1 | xargs rm -rf'
|
||||
sh 'find .'
|
||||
cleanAndSetup()
|
||||
// If using custom CANVAS_LMS_REFSPEC do custom checkout to get correct code
|
||||
if (env.CANVAS_LMS_REFSPEC && !env.CANVAS_LMS_REFSPEC.contains('master')) {
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
branches: [[name: 'FETCH_HEAD']],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [],
|
||||
submoduleCfg: [],
|
||||
userRemoteConfigs: [[
|
||||
credentialsId: '44aa91d6-ab24-498a-b2b4-911bcb17cc35',
|
||||
name: 'origin',
|
||||
refspec: "$env.CANVAS_LMS_REFSPEC",
|
||||
url: "ssh://gerrit.instructure.com:29418/canvas-lms.git"
|
||||
]]
|
||||
])
|
||||
} else {
|
||||
checkout scm
|
||||
}
|
||||
|
||||
def refspecToCheckout = env.CANVAS_LMS_REFSPEC && !env.CANVAS_LMS_REFSPEC.contains('master') ? env.CANVAS_LMS_REFSPEC : env.GERRIT_REFSPEC
|
||||
|
||||
checkout([
|
||||
$class: 'GitSCM',
|
||||
branches: [[name: 'FETCH_HEAD']],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [[$class: 'CloneOption', depth: 100, honorRefspec: true, noTags: true, shallow: true]],
|
||||
submoduleCfg: [],
|
||||
userRemoteConfigs: [[
|
||||
credentialsId: '44aa91d6-ab24-498a-b2b4-911bcb17cc35',
|
||||
name: 'origin',
|
||||
refspec: refspecToCheckout,
|
||||
url: "ssh://gerrit.instructure.com:29418/canvas-lms.git"
|
||||
]]
|
||||
])
|
||||
|
||||
buildParameters += string(name: 'PATCHSET_TAG', value: "${env.PATCHSET_TAG}")
|
||||
buildParameters += string(name: 'POSTGRES', value: "${env.POSTGRES}")
|
||||
|
@ -374,7 +372,7 @@ pipeline {
|
|||
$class: 'GitSCM',
|
||||
branches: [[name: 'FETCH_HEAD']],
|
||||
doGenerateSubmoduleConfigurations: false,
|
||||
extensions: [],
|
||||
extensions: [[$class: 'CloneOption', depth: 1, honorRefspec: true, noTags: true, shallow: true]],
|
||||
submoduleCfg: [],
|
||||
userRemoteConfigs: [[
|
||||
credentialsId: '44aa91d6-ab24-498a-b2b4-911bcb17cc35',
|
||||
|
|
Loading…
Reference in New Issue