Use random string as temporary tag

This commit is contained in:
Rutvij Mehta
2023-05-16 01:25:04 -07:00
parent 490a50eae0
commit 47e09cf885
-11
View File
@@ -583,14 +583,3 @@ func getDigest(buildName string) (string, error) {
}
return "", errors.New("unable to fetch digest")
}
func getUniqueBuildName(repo, buildName string) string {
var shortenCommitSHA string
if len(buildName) <= 8 {
shortenCommitSHA = buildName
} else {
shortenCommitSHA = buildName[:8]
}
imageName := repo[strings.LastIndex(repo, "/")+1:]
return fmt.Sprintf("%s-%s", imageName, shortenCommitSHA)
}