ADD is cacheable now
This commit is contained in:
parent
742e75b1ea
commit
0f483da361
|
|
@ -93,6 +93,7 @@ var additionalKanikoFlagsMap = map[string][]string{
|
|||
"Dockerfile_test_cache_install_oci": {"--cache-copy-layers=true"},
|
||||
"Dockerfile_test_cache_copy": {"--cache-copy-layers=true"},
|
||||
"Dockerfile_test_cache_copy_oci": {"--cache-copy-layers=true"},
|
||||
"Dockerfile_test_issue_add": {"--cache-copy-layers=true"},
|
||||
}
|
||||
|
||||
// output check to do when building with kaniko
|
||||
|
|
@ -226,8 +227,7 @@ func NewDockerFileBuilder() *DockerFileBuilder {
|
|||
"Dockerfile_test_cache_copy": {},
|
||||
"Dockerfile_test_issue_3429": {},
|
||||
"Dockerfile_test_issue_workdir": {},
|
||||
// TODO: ADD command is uncacheable
|
||||
//"Dockerfile_test_issue_add": {},
|
||||
"Dockerfile_test_issue_add": {},
|
||||
"Dockerfile_test_issue_empty": {},
|
||||
}
|
||||
d.TestOCICacheDockerfiles = map[string]struct{}{
|
||||
|
|
|
|||
|
|
@ -440,12 +440,6 @@ func (s *stageBuilder) build() error {
|
|||
|
||||
logrus.Debugf("Build: cache key for command %v %v", command.String(), ck)
|
||||
|
||||
// Raise Warnings for commands that are uncacheable
|
||||
switch command.(type) {
|
||||
case *commands.AddCommand:
|
||||
logrus.Warn("cache-violation: ADD can't be cached - consider using COPY instead.")
|
||||
}
|
||||
|
||||
// Push layer to cache (in parallel) now along with new config file
|
||||
if command.ShouldCacheOutput() && !s.opts.NoPushCache {
|
||||
cacheGroup.Go(func() error {
|
||||
|
|
|
|||
Loading…
Reference in New Issue