Skip to content

Commit

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

Please sign in to comment.