mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-21 10:21:00 +02:00
Rework cache key generation a bit. (#375)
* Rework cache key generation a bit. Cache keys are now based on the previous commands, rather than the previous state of the filesystem. * Refactor command interface a bit, only cache the context for commands that use it.
This commit is contained in:
+1
-10
@@ -23,6 +23,7 @@ import (
|
||||
)
|
||||
|
||||
type ShellCommand struct {
|
||||
BaseCommand
|
||||
cmd *instructions.ShellCommand
|
||||
}
|
||||
|
||||
@@ -32,17 +33,7 @@ func (s *ShellCommand) ExecuteCommand(config *v1.Config, buildArgs *dockerfile.B
|
||||
return nil
|
||||
}
|
||||
|
||||
// FilesToSnapshot returns an empty array since this is a metadata command
|
||||
func (s *ShellCommand) FilesToSnapshot() []string {
|
||||
return []string{}
|
||||
}
|
||||
|
||||
// String returns some information about the command for the image config history
|
||||
func (s *ShellCommand) String() string {
|
||||
return s.cmd.String()
|
||||
}
|
||||
|
||||
// CacheCommand returns false since this command shouldn't be cached
|
||||
func (s *ShellCommand) CacheCommand() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user