-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use go mod download and support windows as suggested in the code review
- Loading branch information
Showing
1 changed file
with
4 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -272,16 +272,15 @@ def withBeatsEnv(Map args = [:], Closure body) { | |
git config --global user.email "[email protected]" | ||
git config --global user.name "beatsmachine" | ||
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 (sh(label: 'Fetch go dependencies', script: 'go get ./...', returnStatus: true) > 0) { | ||
sh(label: 'Fetch go dependencies - retry', script: 'go get ./...', returnStatus: true) | ||
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) | ||
} | ||
} | ||
try { | ||
body() | ||
} finally { | ||
if (archive) { | ||
|