Skip to content

Commit

Permalink
No longer doing shallow clones
Browse files Browse the repository at this point in the history
unshallow takes a very long time, plus we hardlink objects between clones
as a background maintenance job.
  • Loading branch information
ao-apps committed Sep 19, 2023
1 parent 405eb8a commit b0200b1
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
19 changes: 10 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,7 @@ or any build that adds or removes build artifacts."""
}
}
steps {
// See https://www.jenkins.io/doc/pipeline/steps/params/gitscm/
// See https://www.jenkins.io/doc/pipeline/steps/workflow-scm-step/#checkout-check-out-from-version-control
// See https://stackoverflow.com/questions/43293334/sparsecheckout-in-jenkinsfile-pipeline
/*
Expand Down Expand Up @@ -714,17 +715,17 @@ or any build that adds or removes build artifacts."""
// [$class: 'CleanCheckout'],
[$class: 'CloneOption',
// See https://issues.jenkins.io/browse/JENKINS-45586
shallow: true,
depth: 20,
shallow: false,
// depth: 20,
honorRefspec: true
],
[$class: 'SparseCheckoutPaths',
sparseCheckoutPaths: sparseCheckoutPaths
],
[$class: 'SubmoduleOption',
disableSubmodules: disableSubmodules,
shallow: true,
depth: 20
shallow: false
// depth: 20
]
]
]
Expand Down Expand Up @@ -754,17 +755,17 @@ or any build that adds or removes build artifacts."""
// [$class: 'CleanCheckout'],
[$class: 'CloneOption',
// See https://issues.jenkins.io/browse/JENKINS-45586
shallow: true,
depth: 20,
shallow: false,
// depth: 20,
honorRefspec: true
],
[$class: 'SparseCheckoutPaths',
sparseCheckoutPaths: sparseCheckoutPaths
],
[$class: 'SubmoduleOption',
disableSubmodules: disableSubmodules,
shallow: true,
depth: 20
shallow: false
// depth: 20
]
]
]
Expand Down Expand Up @@ -979,7 +980,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
// Steps moved to separate function to avoid "Method too large"
// See https://stackoverflow.com/a/47631522
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) {
sh "${niceCmd}git fetch --unshallow || true" // SonarQube does not currently support shallow fetch
// Not doing shallow: sh "${niceCmd}git fetch --unshallow || true" // SonarQube does not currently support shallow fetch
dir(projectDir) {
withSonarQubeEnv(installationName: 'AO SonarQube') {
withMaven(
Expand Down
19 changes: 10 additions & 9 deletions book/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -693,6 +693,7 @@ or any build that adds or removes build artifacts."""
}
}
steps {
// See https://www.jenkins.io/doc/pipeline/steps/params/gitscm/
// See https://www.jenkins.io/doc/pipeline/steps/workflow-scm-step/#checkout-check-out-from-version-control
// See https://stackoverflow.com/questions/43293334/sparsecheckout-in-jenkinsfile-pipeline
/*
Expand Down Expand Up @@ -720,17 +721,17 @@ or any build that adds or removes build artifacts."""
// [$class: 'CleanCheckout'],
[$class: 'CloneOption',
// See https://issues.jenkins.io/browse/JENKINS-45586
shallow: true,
depth: 20,
shallow: false,
// depth: 20,
honorRefspec: true
],
[$class: 'SparseCheckoutPaths',
sparseCheckoutPaths: sparseCheckoutPaths
],
[$class: 'SubmoduleOption',
disableSubmodules: disableSubmodules,
shallow: true,
depth: 20
shallow: false
// depth: 20
]
]
]
Expand Down Expand Up @@ -760,17 +761,17 @@ or any build that adds or removes build artifacts."""
// [$class: 'CleanCheckout'],
[$class: 'CloneOption',
// See https://issues.jenkins.io/browse/JENKINS-45586
shallow: true,
depth: 20,
shallow: false,
// depth: 20,
honorRefspec: true
],
[$class: 'SparseCheckoutPaths',
sparseCheckoutPaths: sparseCheckoutPaths
],
[$class: 'SubmoduleOption',
disableSubmodules: disableSubmodules,
shallow: true,
depth: 20
shallow: false
// depth: 20
]
]
]
Expand Down Expand Up @@ -985,7 +986,7 @@ void deploySteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk1
// Steps moved to separate function to avoid "Method too large"
// See https://stackoverflow.com/a/47631522
void sonarQubeAnalysisSteps(niceCmd, projectDir, deployJdk, maven, mavenOpts, mavenOptsJdk16, mvnCommon) {
sh "${niceCmd}git fetch --unshallow || true" // SonarQube does not currently support shallow fetch
// Not doing shallow: sh "${niceCmd}git fetch --unshallow || true" // SonarQube does not currently support shallow fetch
dir(projectDir) {
withSonarQubeEnv(installationName: 'AO SonarQube') {
withMaven(
Expand Down

0 comments on commit b0200b1

Please sign in to comment.