Skip to content

Commit

Permalink
[BUILD][CI] fetch dependencies with retry (#21614) (#21831)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v committed Oct 16, 2020
1 parent 5b88675 commit 5498661
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,13 @@ def withBeatsEnv(Map args = [:], Closure body) {
fi''')
}
try {
// Add more stability when dependencies are not accessible temporarily
// See https://github.com/elastic/beats/issues/21609
// retry/try/catch approach reports errors, let's avoid it to keep the
// notifications cleaner.
if (cmd(label: 'Download modules to local cache', script: 'go mod download', returnStatus: true) > 0) {
cmd(label: 'Download modules to local cache - retry', script: 'go mod download', returnStatus: true)
}
body()
} finally {
if (archive) {
Expand Down

0 comments on commit 5498661

Please sign in to comment.