Use only the necessary files in the cache keys. (#387)

This commit is contained in:
dlorenc
2018-10-15 08:56:34 -05:00
committed by GitHub
parent 72e088fda5
commit 5ac29a9773
6 changed files with 114 additions and 36 deletions
+10 -6
View File
@@ -16,19 +16,23 @@ limitations under the License.
package commands
import (
"github.com/GoogleContainerTools/kaniko/pkg/dockerfile"
"github.com/google/go-containerregistry/pkg/v1"
)
type BaseCommand struct {
cache bool
usesContext bool
cache bool
}
func (b *BaseCommand) CacheCommand() bool {
return b.cache
}
func (b *BaseCommand) UsesContext() bool {
return b.usesContext
}
func (b *BaseCommand) FilesToSnapshot() []string {
return []string{}
}
func (b *BaseCommand) FilesUsedFromContext(_ *v1.Config, _ *dockerfile.BuildArgs) ([]string, error) {
return []string{}, nil
}