Skip to content

Commit

Permalink
fix(artifactPrepareVersion): add missing error handling (#5005)
Browse files Browse the repository at this point in the history
* add error handling

* add retries
  • Loading branch information
Googlom committed Aug 19, 2024
1 parent 8109f6f commit 773332f
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/artifactPrepareVersion.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func newArtifactPrepareVersionUtilsBundle() artifactPrepareVersionUtils {
Files: &piperutils.Files{},
Client: &piperhttp.Client{},
}
utils.Client.SetOptions(piperhttp.ClientOptions{MaxRetries: 3})
utils.Stdout(log.Writer())
utils.Stderr(log.Writer())
return &utils
Expand Down Expand Up @@ -208,6 +209,10 @@ func runArtifactPrepareVersion(config *artifactPrepareVersionOptions, telemetryD

if config.VersioningType == "cloud" {
certs, err := certutils.CertificateDownload(config.CustomTLSCertificateLinks, utils)
if err != nil {
return err
}

// commit changes and push to repository (including new version tag)
gitCommitID, err = pushChanges(config, newVersion, repository, worktree, now, certs)
if err != nil {
Expand Down

0 comments on commit 773332f

Please sign in to comment.