mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-18 14:36:03 +02:00
rename whitelist to ignorelist
This commit is contained in:
@@ -314,8 +314,8 @@ func (s *stageBuilder) build() error {
|
||||
logrus.Info("Skipping unpacking as no commands require it.")
|
||||
}
|
||||
|
||||
if err := util.DetectFilesystemWhitelist(config.WhitelistPath); err != nil {
|
||||
return errors.Wrap(err, "failed to check filesystem whitelist")
|
||||
if err := util.DetectFilesystemIgnoreList(config.IgnoreListPath); err != nil {
|
||||
return errors.Wrap(err, "failed to check filesystem mount paths")
|
||||
}
|
||||
|
||||
initSnapshotTaken := false
|
||||
|
||||
@@ -69,7 +69,7 @@ func (s *CompositeCache) AddPath(p, context string) error {
|
||||
}
|
||||
|
||||
// Only add the hash of this directory to the key
|
||||
// if there is any whitelisted content.
|
||||
// if there is any ignored content.
|
||||
if !empty || !util.ExcludeFile(p, context) {
|
||||
s.keys = append(s.keys, k)
|
||||
}
|
||||
|
||||
@@ -166,7 +166,7 @@ func setupMultistageTests(t *testing.T) (string, func()) {
|
||||
// set up config
|
||||
config.RootDir = testDir
|
||||
config.KanikoDir = fmt.Sprintf("%s/%s", testDir, "kaniko")
|
||||
// Write a whitelist path
|
||||
// Write path to ignore list
|
||||
if err := os.MkdirAll(filepath.Join(testDir, "proc"), 0755); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -178,10 +178,10 @@ func setupMultistageTests(t *testing.T) (string, func()) {
|
||||
if err := ioutil.WriteFile(mFile, []byte(mountInfo), 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
config.WhitelistPath = mFile
|
||||
config.IgnoreListPath = mFile
|
||||
return testDir, func() {
|
||||
config.KanikoDir = constants.KanikoDir
|
||||
config.RootDir = constants.RootDir
|
||||
config.WhitelistPath = constants.WhitelistPath
|
||||
config.IgnoreListPath = constants.IgnoreListPath
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user