"fix: resolve issue where cache layers would be pushed if --no-push was specified" (#3132)
This commit is contained in:
parent
0da9ed0e49
commit
d65b9b5418
|
|
@ -398,8 +398,8 @@ func pushLayerToCache(opts *config.KanikoOptions, cacheKey string, tarPath strin
|
|||
return errors.Wrap(err, "appending layer onto empty image")
|
||||
}
|
||||
cacheOpts := *opts
|
||||
cacheOpts.TarPath = "" // tarPath doesn't make sense for Docker layers
|
||||
cacheOpts.NoPush = false // we want to push cached layers
|
||||
cacheOpts.TarPath = "" // tarPath doesn't make sense for Docker layers
|
||||
cacheOpts.NoPush = opts.NoPush // we don't want to push cached layers if no push is specified
|
||||
cacheOpts.Destinations = []string{cache}
|
||||
cacheOpts.InsecureRegistries = opts.InsecureRegistries
|
||||
cacheOpts.SkipTLSVerifyRegistries = opts.SkipTLSVerifyRegistries
|
||||
|
|
|
|||
Loading…
Reference in New Issue