From 785691ecc25460eab5250036f490f26ce3c2453b Mon Sep 17 00:00:00 2001 From: Kartik Verma Date: Sat, 2 Feb 2019 11:18:54 +0530 Subject: [PATCH] Made changes as per review --- integration/images.go | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/integration/images.go b/integration/images.go index bb5508996..f26607816 100644 --- a/integration/images.go +++ b/integration/images.go @@ -153,10 +153,8 @@ func (d *DockerFileBuilder) BuildImage(imageRepo, gcsBucket, dockerfilesPath, do additionalFlags := append(buildArgs, additionalDockerFlagsMap[dockerfile]...) dockerImage := strings.ToLower(imageRepo + dockerPrefix + dockerfile) dockerPath := "." - contextTest := bucketContextTests if dockerfile == "Dockerfile_test_git" { - dockerPath = "../" - contextTest = gitRepoTests + dockerPath = "https://github.com/GoogleContainerTools/kaniko" } dockerCmd := exec.Command("docker", append([]string{"build", @@ -173,11 +171,16 @@ func (d *DockerFileBuilder) BuildImage(imageRepo, gcsBucket, dockerfilesPath, do contextFlag := "-c" contextPath := buildContextPath - for _, d := range contextTest { + for _, d := range bucketContextTests { if d == dockerfile { contextFlag = "-b" - contextPath = "git://github.com/GoogleContainerTools/kaniko" - break + contextPath = gcsBucket + } + } + + for _, d := range gitRepoTests { + if d == dockerfile { + contextPath = "git://https://github.com/GoogleContainerTools/kaniko" } }