Update go-containerregistry dep and remove unnecessary Options

This commit is contained in:
Jason Hall
2018-10-01 14:11:26 -04:00
parent 139d372e77
commit 5a0c9b2a13
8 changed files with 17 additions and 50 deletions
+1 -1
View File
@@ -307,7 +307,7 @@ func saveStageAsTarball(stageIndex int, image v1.Image) error {
}
tarPath := filepath.Join(constants.KanikoIntermediateStagesDir, strconv.Itoa(stageIndex))
logrus.Infof("Storing source image from stage %d at path %s", stageIndex, tarPath)
return tarball.WriteToFile(tarPath, destRef, image, nil)
return tarball.WriteToFile(tarPath, destRef, image)
}
func getHasher(snapshotMode string) (func(string) (string, error), error) {
+2 -2
View File
@@ -66,7 +66,7 @@ func DoPush(image v1.Image, opts *config.KanikoOptions) error {
for _, destRef := range destRefs {
tagToImage[destRef] = image
}
return tarball.MultiWriteToFile(opts.TarPath, tagToImage, nil)
return tarball.MultiWriteToFile(opts.TarPath, tagToImage)
}
// continue pushing unless an error occurs
@@ -98,7 +98,7 @@ func DoPush(image v1.Image, opts *config.KanikoOptions) error {
}
rt := &withUserAgent{t: tr}
if err := remote.Write(destRef, image, pushAuth, rt, remote.WriteOptions{}); err != nil {
if err := remote.Write(destRef, image, pushAuth, rt); err != nil {
return errors.Wrap(err, fmt.Sprintf("failed to push to destination %s", destRef))
}
}