From a90fa252bb502fe473f53420b06ed2a7489c2139 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Mon, 16 Apr 2018 13:01:23 -0700 Subject: [PATCH 1/4] Run integration tests in kokoro --- integration-test.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/integration-test.sh b/integration-test.sh index c44135fd3..9971d67a7 100755 --- a/integration-test.sh +++ b/integration-test.sh @@ -13,7 +13,14 @@ # limitations under the License. #!/bin/bash -set -e +set -ex + +if [ -f "$KOKORO_GFILE_DIR"/common.sh ]; then + echo "Installing dependencies..." + source "$KOKORO_GFILE_DIR/common.sh" + pushd github/kaniko +fi echo "Running integration tests..." +make out/executor go run integration_tests/integration_test_yaml.go | gcloud container builds submit --config /dev/fd/0 . From b47f682c80ec183f9d435344def46520c666bfa3 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Mon, 16 Apr 2018 13:36:08 -0700 Subject: [PATCH 2/4] Fix 'text file busy' error --- pkg/util/fs_util.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/util/fs_util.go b/pkg/util/fs_util.go index 3c25a1878..5fb06f6ee 100644 --- a/pkg/util/fs_util.go +++ b/pkg/util/fs_util.go @@ -160,6 +160,7 @@ func CreateFile(path string, reader io.Reader, perm os.FileMode) error { if err != nil { return err } + defer dest.Close() if _, err := io.Copy(dest, reader); err != nil { return err } From 3a52d1490a35700dd889d120a9fcb969d2979a0f Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Mon, 16 Apr 2018 14:12:51 -0700 Subject: [PATCH 3/4] move kaniko into gopath --- integration-test.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/integration-test.sh b/integration-test.sh index 9971d67a7..2763b0ccd 100755 --- a/integration-test.sh +++ b/integration-test.sh @@ -18,7 +18,9 @@ set -ex if [ -f "$KOKORO_GFILE_DIR"/common.sh ]; then echo "Installing dependencies..." source "$KOKORO_GFILE_DIR/common.sh" - pushd github/kaniko + mkdir -p /usr/local/go/src/github.com/GoogleCloudPlatform/ + cp -r github/kaniko /usr/local/go/src/github.com/GoogleCloudPlatform/ + pushd /usr/local/go/src/github.com/GoogleCloudPlatform/kaniko fi echo "Running integration tests..." From bb5fc24847c3bc13000ee8c4588286509d99ede9 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Mon, 16 Apr 2018 16:52:23 -0700 Subject: [PATCH 4/4] fix error --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 22dfb53a1..0d58c4013 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Requirements: To run kaniko in a Kubernetes cluster, you will need a standard running Kubernetes cluster and a Kubernetes secret, which contains the auth required to push the final image. -To create the secret, first you will need to create a service account in the Pantheon project you want to push the final image to, with `Storage Admin` permissions. +To create the secret, first you will need to create a service account in the Google Cloud Console project you want to push the final image to, with `Storage Admin` permissions. You can download a JSON key for this service account, and rename it `kaniko-secret.json`. To create the secret, run: