Skip to content

Commit 0e19f76

Browse files
committed
[BUILD][CI] fetch dependencies with retry (elastic#21614)
1 parent 81dc892 commit 0e19f76

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

Jenkinsfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,13 @@ def withBeatsEnv(Map args = [:], Closure body) {
269269
fi''')
270270
}
271271
try {
272+
// Add more stability when dependencies are not accessible temporarily
273+
// See https://github.com/elastic/beats/issues/21609
274+
// retry/try/catch approach reports errors, let's avoid it to keep the
275+
// notifications cleaner.
276+
if (cmd(label: 'Download modules to local cache', script: 'go mod download', returnStatus: true) > 0) {
277+
cmd(label: 'Download modules to local cache - retry', script: 'go mod download', returnStatus: true)
278+
}
272279
body()
273280
} finally {
274281
if (archive) {

0 commit comments

Comments
 (0)