Skip to content

Commit

Permalink
feat: retry if deb mirror update fails
Browse files Browse the repository at this point in the history
  • Loading branch information
rubenruizdegauna committed Feb 10, 2025
1 parent 50b9604 commit 7cfcbf4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion publisher/upload/upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,9 +346,10 @@ func mirrorAPTRepo(conf config.Config, repoUrl string, osVersion string) (err er
utils.Logger.Printf("[✔] Mirror create succesfully APT repo for %s", osVersion)

utils.Logger.Printf("[ ] Mirror update APT repo for %s", osVersion)
if err = utils.ExecLogOutput(utils.Logger, "aptly", commandTimeout, "mirror", "update", "-max-tries", strconv.Itoa(s3Retries), "-keyring", conf.GpgKeyRing, "mirror-"+osVersion); err != nil {
if err = utils.ExecWithRetries(s3Retries, utils.S3RemountFn, utils.Logger, "aptly", commandTimeout, "mirror", "update", "-max-tries", strconv.Itoa(s3Retries), "-keyring", conf.GpgKeyRing, "mirror-"+osVersion); err != nil {
return err
}

utils.Logger.Printf("[✔] Mirror update succesfully APT repo for %s", osVersion)

// The last parameter is `Name` that means a query matches all the packages (as it means “package name is not empty”).
Expand Down

0 comments on commit 7cfcbf4

Please sign in to comment.