mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[ci/getCheckoutInfo] retry fetching upstream changes to calculate mergeBase (#69320)
Co-authored-by: spalger <spalger@users.noreply.github.com>
This commit is contained in:
parent
ade4c8dded
commit
5c327a12dd
1 changed files with 8 additions and 4 deletions
|
@ -22,10 +22,14 @@ def call(branchOverride) {
|
|||
).trim()
|
||||
|
||||
if (repoInfo.targetBranch) {
|
||||
sh(
|
||||
script: "git fetch origin ${repoInfo.targetBranch}",
|
||||
label: "fetch latest from '${repoInfo.targetBranch}' at origin"
|
||||
)
|
||||
// Try to clone fetch from Github up to 8 times, waiting 15 secs between attempts
|
||||
retryWithDelay(8, 15) {
|
||||
sh(
|
||||
script: "git fetch origin ${repoInfo.targetBranch}",
|
||||
label: "fetch latest from '${repoInfo.targetBranch}' at origin"
|
||||
)
|
||||
}
|
||||
|
||||
repoInfo.mergeBase = sh(
|
||||
script: "git merge-base HEAD FETCH_HEAD",
|
||||
label: "determining merge point with '${repoInfo.targetBranch}' at origin",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue