1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-16 05:16:08 +02:00

fix(artifactPrepareVersion): add missing error handling (#5005)

* add error handling

* add retries
This commit is contained in:
Googlom 2024-08-19 11:50:40 +05:00 committed by GitHub
parent 8109f6fbe8
commit 773332fe1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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
@ -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 {