mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-10-19 00:23:22 +02:00
mend
This commit is contained in:
@@ -273,13 +273,11 @@ func (d *DockerFileBuilder) BuildImageWithContext(config *integrationTestConfig,
|
||||
|
||||
kanikoImage := GetKanikoImage(imageRepo, dockerfile)
|
||||
timer = timing.Start(dockerfile + "_kaniko")
|
||||
out, err := buildKanikoImage(dockerfilesPath, dockerfile, buildArgs, additionalKanikoFlags, kanikoImage,
|
||||
contextDir, gcsBucket, serviceAccount, true)
|
||||
if err != nil {
|
||||
if _, err := buildKanikoImage(dockerfilesPath, dockerfile, buildArgs, additionalKanikoFlags, kanikoImage,
|
||||
contextDir, gcsBucket, serviceAccount, true); err != nil {
|
||||
return err
|
||||
}
|
||||
timing.DefaultRun.Stop(timer)
|
||||
fmt.Println(out)
|
||||
|
||||
d.filesBuilt[dockerfile] = struct{}{}
|
||||
|
||||
@@ -454,6 +452,5 @@ func buildKanikoImage(
|
||||
return "", fmt.Errorf("Output check failed for image %s with kaniko command : %s %s", kanikoImage, err, string(out))
|
||||
}
|
||||
}
|
||||
fmt.Println("kaniko command\n", string(out))
|
||||
return benchmarkDir, nil
|
||||
}
|
||||
|
||||
@@ -142,26 +142,26 @@ func buildRequiredImages() error {
|
||||
name: "Building kaniko image",
|
||||
command: []string{"docker", "build", "-t", ExecutorImage, "-f", "../deploy/Dockerfile", ".."},
|
||||
},
|
||||
//{
|
||||
// name: "Building cache warmer image",
|
||||
// command: []string{"docker", "build", "-t", WarmerImage, "-f", "../deploy/Dockerfile_warmer", ".."},
|
||||
//},
|
||||
//{
|
||||
// name: "Building onbuild base image",
|
||||
// command: []string{"docker", "build", "-t", config.onbuildBaseImage, "-f", fmt.Sprintf("%s/Dockerfile_onbuild_base", dockerfilesPath), "."},
|
||||
//},
|
||||
//{
|
||||
// name: "Pushing onbuild base image",
|
||||
// command: []string{"docker", "push", config.onbuildBaseImage},
|
||||
//},
|
||||
//{
|
||||
// name: "Building hardlink base image",
|
||||
// command: []string{"docker", "build", "-t", config.hardlinkBaseImage, "-f", fmt.Sprintf("%s/Dockerfile_hardlink_base", dockerfilesPath), "."},
|
||||
//},
|
||||
//{
|
||||
// name: "Pushing hardlink base image",
|
||||
// command: []string{"docker", "push", config.hardlinkBaseImage},
|
||||
//},
|
||||
{
|
||||
name: "Building cache warmer image",
|
||||
command: []string{"docker", "build", "-t", WarmerImage, "-f", "../deploy/Dockerfile_warmer", ".."},
|
||||
},
|
||||
{
|
||||
name: "Building onbuild base image",
|
||||
command: []string{"docker", "build", "-t", config.onbuildBaseImage, "-f", fmt.Sprintf("%s/Dockerfile_onbuild_base", dockerfilesPath), "."},
|
||||
},
|
||||
{
|
||||
name: "Pushing onbuild base image",
|
||||
command: []string{"docker", "push", config.onbuildBaseImage},
|
||||
},
|
||||
{
|
||||
name: "Building hardlink base image",
|
||||
command: []string{"docker", "build", "-t", config.hardlinkBaseImage, "-f", fmt.Sprintf("%s/Dockerfile_hardlink_base", dockerfilesPath), "."},
|
||||
},
|
||||
{
|
||||
name: "Pushing hardlink base image",
|
||||
command: []string{"docker", "push", config.hardlinkBaseImage},
|
||||
},
|
||||
}
|
||||
|
||||
for _, setupCmd := range setupCommands {
|
||||
@@ -294,7 +294,6 @@ func TestGitBuildcontextSubPath(t *testing.T) {
|
||||
kanikoCmd := exec.Command("docker", dockerRunFlags...)
|
||||
|
||||
out, err = RunCommandWithoutTest(kanikoCmd)
|
||||
fmt.Println(out)
|
||||
if err != nil {
|
||||
t.Errorf("Failed to build image %s with kaniko command %q: %v %s", dockerImage, kanikoCmd.Args, err, string(out))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user