mirror of
https://github.com/GoogleContainerTools/kaniko
synced 2026-09-30 07:08:04 +02:00
Actually fix the paths for benchmark uploading during integration test runs. (#543)
This commit is contained in:
+2
-1
@@ -55,9 +55,10 @@ func UploadFileToBucket(gcsBucket string, filePath string, gcsPath string) (stri
|
||||
cmd := exec.Command("gsutil", "cp", filePath, dst)
|
||||
out, err := RunCommandWithoutTest(cmd)
|
||||
if err != nil {
|
||||
log.Printf("Error uploading file %s to GCS at %s: %s", filePath, dst, err)
|
||||
log.Println(string(out))
|
||||
return "", fmt.Errorf("Failed to copy tarball to GCS bucket %s: %s", gcsBucket, err)
|
||||
}
|
||||
log.Println(string(out))
|
||||
|
||||
return dst, nil
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ func (d *DockerFileBuilder) BuildImage(imageRepo, gcsBucket, dockerfilesPath, do
|
||||
}
|
||||
if b, err := strconv.ParseBool(os.Getenv("BENCHMARK")); err == nil && b {
|
||||
benchmarkEnv = "BENCHMARK_FILE=/kaniko/benchmarks/" + dockerfile
|
||||
benchmarkFile := path.Join("benchmarks", dockerfile)
|
||||
benchmarkFile := path.Join(benchmarkDir, dockerfile)
|
||||
dst := path.Join("benchmarks/run_"+time.Now().Format("2006-01-02-15:04:05"), dockerfile)
|
||||
defer UploadFileToBucket(gcsBucket, benchmarkFile, dst)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user