Rename flags and default caching to false

Rename --use-cache to --cache, and --cache to --cache-repo to clarify
what the flags are used for. Default caching to false.
This commit is contained in:
Priya Wadhwa
2018-09-24 13:18:42 -07:00
parent 177bd4f40e
commit e2ca1152f4
5 changed files with 12 additions and 11 deletions
+2 -2
View File
@@ -153,7 +153,7 @@ func (s *stageBuilder) build(opts *config.KanikoOptions) error {
if err != nil {
return errors.Wrap(err, "getting key")
}
if command.CacheCommand() && opts.UseCache {
if command.CacheCommand() && opts.Cache {
image, err := cache.RetrieveLayer(opts, cacheKey)
if err == nil {
if err := s.extractCachedLayer(image, command.String()); err != nil {
@@ -212,7 +212,7 @@ func (s *stageBuilder) build(opts *config.KanikoOptions) error {
return err
}
// Push layer to cache now along with new config file
if command.CacheCommand() && opts.UseCache {
if command.CacheCommand() && opts.Cache {
if err := pushLayerToCache(opts, cacheKey, layer, command.String()); err != nil {
return err
}