|
|
|
|
@ -241,7 +241,15 @@ func downloadPackerRelease(ctx context.Context, goos, goarch string) (string, er
|
|
|
|
|
log.Printf("[INFO] Downloading Packer %s for %s/%s...", version, goos, goarch)
|
|
|
|
|
|
|
|
|
|
// Download the release zip.
|
|
|
|
|
zipPath, err := downloadURLToTempFile(ctx, client, zipURL, ".zip")
|
|
|
|
|
var zipPath string
|
|
|
|
|
err = retry.Config{
|
|
|
|
|
Tries: 3,
|
|
|
|
|
RetryDelay: func() time.Duration {return 5 * time.Second},
|
|
|
|
|
}.Run(ctx , func(ctx context.Context) error {
|
|
|
|
|
var e error
|
|
|
|
|
zipPath, e = downloadURLToTempFile(ctx, client, zipURL, ".zip")
|
|
|
|
|
return e
|
|
|
|
|
})
|
|
|
|
|
if err != nil {
|
|
|
|
|
return "", fmt.Errorf("failed to download Packer release zip: %w", err)
|
|
|
|
|
}
|
|
|
|
|
|