This reverts commit 754253d375.
This commit is contained in:
parent
754253d375
commit
094fe52b37
|
|
@ -22,12 +22,10 @@ import (
|
||||||
|
|
||||||
var RootDir string
|
var RootDir string
|
||||||
var KanikoDir string
|
var KanikoDir string
|
||||||
var TempDir string
|
|
||||||
var IgnoreListPath string
|
var IgnoreListPath string
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
RootDir = constants.RootDir
|
RootDir = constants.RootDir
|
||||||
KanikoDir = constants.KanikoDir
|
KanikoDir = constants.KanikoDir
|
||||||
TempDir = constants.TempDir
|
|
||||||
IgnoreListPath = constants.IgnoreListPath
|
IgnoreListPath = constants.IgnoreListPath
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,9 +23,6 @@ const (
|
||||||
//KanikoDir is the path to the Kaniko directory
|
//KanikoDir is the path to the Kaniko directory
|
||||||
KanikoDir = "/kaniko"
|
KanikoDir = "/kaniko"
|
||||||
|
|
||||||
// TempDir is the path to the temp directory
|
|
||||||
TempDir = "/kaniko/tmp"
|
|
||||||
|
|
||||||
IgnoreListPath = "/proc/self/mountinfo"
|
IgnoreListPath = "/proc/self/mountinfo"
|
||||||
|
|
||||||
Author = "kaniko"
|
Author = "kaniko"
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ func (s *Snapshotter) Key() (string, error) {
|
||||||
// TakeSnapshot takes a snapshot of the specified files, avoiding directories in the ignorelist, and creates
|
// TakeSnapshot takes a snapshot of the specified files, avoiding directories in the ignorelist, and creates
|
||||||
// a tarball of the changed files. Return contents of the tarball, and whether or not any files were changed
|
// a tarball of the changed files. Return contents of the tarball, and whether or not any files were changed
|
||||||
func (s *Snapshotter) TakeSnapshot(files []string, shdCheckDelete bool) (string, error) {
|
func (s *Snapshotter) TakeSnapshot(files []string, shdCheckDelete bool) (string, error) {
|
||||||
f, err := ioutil.TempFile(config.TempDir, "")
|
f, err := ioutil.TempFile(config.KanikoDir, "")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", err
|
return "", err
|
||||||
}
|
}
|
||||||
|
|
@ -143,7 +143,7 @@ func (s *Snapshotter) TakeSnapshotFS() (string, error) {
|
||||||
|
|
||||||
func (s *Snapshotter) getSnashotPathPrefix() string {
|
func (s *Snapshotter) getSnashotPathPrefix() string {
|
||||||
if snapshotPathPrefix == "" {
|
if snapshotPathPrefix == "" {
|
||||||
return config.TempDir
|
return config.KanikoDir
|
||||||
}
|
}
|
||||||
return snapshotPathPrefix
|
return snapshotPathPrefix
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue