Skip to content

Commit

Permalink
[BUILD][CI] fetch dependencies with retry (#21614)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Oct 15, 2020
1 parent fc10f06 commit be5c290
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 @@ -275,6 +275,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 be5c290

Please sign in to comment.