diff --git a/integration/images.go b/integration/images.go index 43898dbd5..73f4679ba 100644 --- a/integration/images.go +++ b/integration/images.go @@ -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,9 +227,8 @@ 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_empty": {}, + "Dockerfile_test_issue_add": {}, + "Dockerfile_test_issue_empty": {}, } d.TestOCICacheDockerfiles = map[string]struct{}{ "Dockerfile_test_cache_oci": {}, diff --git a/pkg/executor/build.go b/pkg/executor/build.go index e95317ca5..4c4b69ab3 100644 --- a/pkg/executor/build.go +++ b/pkg/executor/build.go @@ -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 {