Enable pushing cache with --no-push (#3181)
Make sure we check --no-cache-push instead of --no-push when deciding whether to push cache or not.
This commit is contained in:
parent
942fbe65e8
commit
6a340c6a1f
|
|
@ -399,7 +399,7 @@ func pushLayerToCache(opts *config.KanikoOptions, cacheKey string, tarPath strin
|
||||||
}
|
}
|
||||||
cacheOpts := *opts
|
cacheOpts := *opts
|
||||||
cacheOpts.TarPath = "" // tarPath doesn't make sense for Docker 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.NoPush = opts.NoPushCache // we do not want to push cache if --no-push-cache is set.
|
||||||
cacheOpts.Destinations = []string{cache}
|
cacheOpts.Destinations = []string{cache}
|
||||||
cacheOpts.InsecureRegistries = opts.InsecureRegistries
|
cacheOpts.InsecureRegistries = opts.InsecureRegistries
|
||||||
cacheOpts.SkipTLSVerifyRegistries = opts.SkipTLSVerifyRegistries
|
cacheOpts.SkipTLSVerifyRegistries = opts.SkipTLSVerifyRegistries
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue