From 857715012fe167a95cd0ac143ad7b3453bd2fc68 Mon Sep 17 00:00:00 2001 From: Prashant Arya Date: Tue, 26 Nov 2019 17:52:11 +0000 Subject: [PATCH] changing log level --- Dockerfile | 2 ++ context.tar.gz | Bin 0 -> 151 bytes pkg/snapshot/snapshot.go | 6 +++--- pkg/util/fs_util.go | 4 ++-- run_in_docker.sh | 12 ++++-------- 5 files changed, 11 insertions(+), 13 deletions(-) create mode 100644 Dockerfile create mode 100644 context.tar.gz diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..5e4a6c5d6 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,2 @@ +FROM alpine:latest +Run echo "prashant.arya" diff --git a/context.tar.gz b/context.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..a665c4fdee9a9ba783f1712ee641287171f0ddd4 GIT binary patch literal 151 zcmb2|=3tn|eIu5E`R%!lT!#!qS|6UVbCr9jmKjtaW-j=P%~46Dd725|zP;Nx{1$l& zKKwt8`TL!RIeP8ETF33ww@OrU_!=+G+-r0B%=ek4r!3@~I=_y6xJ|5xU2zyESZ`@cEYEU%edySiSTkpUU(D_}o#AUKafgMk46=7U05 literal 0 HcmV?d00001 diff --git a/pkg/snapshot/snapshot.go b/pkg/snapshot/snapshot.go index 5577da087..113930c9a 100644 --- a/pkg/snapshot/snapshot.go +++ b/pkg/snapshot/snapshot.go @@ -134,7 +134,7 @@ func (s *Snapshotter) scanFullFilesystem() ([]string, []string, error) { Callback: func(path string, ent *godirwalk.Dirent) error { if util.IsInWhitelist(path) { if util.IsDestDir(path) { - logrus.Debugf("Skipping paths under %s, as it is a whitelisted directory", path) + logrus.Tracef("Skipping paths under %s, as it is a whitelisted directory", path) return filepath.SkipDir } return nil @@ -170,7 +170,7 @@ func (s *Snapshotter) scanFullFilesystem() ([]string, []string, error) { filesToAdd := []string{} for path := range memFs { if util.CheckWhitelist(path) { - logrus.Debugf("Not adding %s to layer, as it's whitelisted", path) + logrus.Tracef("Not adding %s to layer, as it's whitelisted", path) continue } // Only add changed files. @@ -179,7 +179,7 @@ func (s *Snapshotter) scanFullFilesystem() ([]string, []string, error) { return nil, nil, err } if fileChanged { - logrus.Debugf("Adding %s to layer, because it was changed.", path) + logrus.Tracef("Adding %s to layer, because it was changed.", path) filesToAdd = append(filesToAdd, path) } } diff --git a/pkg/util/fs_util.go b/pkg/util/fs_util.go index 00562e56f..68d338bfa 100644 --- a/pkg/util/fs_util.go +++ b/pkg/util/fs_util.go @@ -206,7 +206,7 @@ func extractFile(dest string, hdr *tar.Header, tr io.Reader) error { } switch hdr.Typeflag { case tar.TypeReg: - logrus.Debugf("creating file %s", path) + logrus.Tracef("creating file %s", path) // It's possible a file is in the tar before its directory, // or a file was copied over a directory prior to now fi, err := os.Stat(dir) @@ -496,7 +496,7 @@ func CopyDir(src, dest, buildcontext string) ([]string, error) { } destPath := filepath.Join(dest, file) if fi.IsDir() { - logrus.Debugf("Creating directory %s", destPath) + logrus.Tracef("Creating directory %s", destPath) mode := fi.Mode() uid := int(fi.Sys().(*syscall.Stat_t).Uid) diff --git a/run_in_docker.sh b/run_in_docker.sh index ba95243bd..c82faaa1f 100755 --- a/run_in_docker.sh +++ b/run_in_docker.sh @@ -29,15 +29,11 @@ if [[ ! -z "$4" ]]; then cache=$4 fi -if [[ ! -e $HOME/.config/gcloud/application_default_credentials.json ]]; then - echo "Application Default Credentials do not exist. Run [gcloud auth application-default login] to configure them" - exit 1 -fi docker run \ - -v "$HOME"/.config/gcloud:/root/.config/gcloud \ -v "$context":/workspace \ - gcr.io/kaniko-project/executor:latest \ - --dockerfile "${dockerfile}" --destination "${destination}" --context dir:///workspace/ \ - --cache="${cache}" + docker.io/prary2/kaniko \ + --dockerfile "${dockerfile}" --no-push --context dir:///workspace/ \ + --cache="${cache}" --verbosity=debug + #gcr.io/kaniko-project/executor:latest \