Skip to content

Commit 06c7c70

Browse files
committed
[BUILD][CI] fetch dependencies with retry (elastic#21614)
1 parent 539a4db commit 06c7c70

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
@@ -270,6 +270,13 @@ def withBeatsEnv(Map args = [:], Closure body) {
270270
fi''')
271271
}
272272
try {
273+
// Add more stability when dependencies are not accessible temporarily
274+
// See https://github.com/elastic/beats/issues/21609
275+
// retry/try/catch approach reports errors, let's avoid it to keep the
276+
// notifications cleaner.
277+
if (cmd(label: 'Download modules to local cache', script: 'go mod download', returnStatus: true) > 0) {
278+
cmd(label: 'Download modules to local cache - retry', script: 'go mod download', returnStatus: true)
279+
}
273280
body()
274281
} finally {
275282
if (archive) {

0 commit comments

Comments
 (0)