From 389c3e9cea0e1f2b34d475e858942ae9c6f12e05 Mon Sep 17 00:00:00 2001 From: Taras Madan Date: Fri, 26 Jul 2024 13:33:42 +0200 Subject: all: make coverage-merger client name configurable --- dashboard/app/coverage_batch.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'dashboard/app/coverage_batch.go') diff --git a/dashboard/app/coverage_batch.go b/dashboard/app/coverage_batch.go index 8a88efa80..1e4b59d0f 100644 --- a/dashboard/app/coverage_batch.go +++ b/dashboard/app/coverage_batch.go @@ -55,7 +55,10 @@ func handleBatchCoverage(w http.ResponseWriter, r *http.Request) { ctx, nsCovConfig.BatchProject, nsCovConfig.BatchServiceAccount, - batchScript(ns, repo, branch, 7, dates, nsCovConfig.JobInitScript, nsCovConfig.SyzEnvInitScript), + batchScript(ns, repo, branch, 7, dates, + nsCovConfig.JobInitScript, + nsCovConfig.SyzEnvInitScript, + nsCovConfig.DashboardClientName), nsCovConfig.BatchScopes); err != nil { log.Errorf(ctx, "failed to batchScript: %s", err.Error()) } @@ -63,7 +66,10 @@ func handleBatchCoverage(w http.ResponseWriter, r *http.Request) { } func batchScript(ns, repo, branch string, days int, datesTo []civil.Date, - jobInitScript, syzEnvInitScript string) string { + jobInitScript, syzEnvInitScript, clientName string) string { + if clientName == "" { + clientName = defaultDashboardClientName + } script := jobInitScript + "\n" script += "git clone --depth 1 --branch master --single-branch https://github.com/google/syzkaller\n" + "cd syzkaller\n" + @@ -80,6 +86,7 @@ func batchScript(ns, repo, branch string, days int, datesTo []civil.Date, " -b " + branch + " -d " + strconv.Itoa(days) + " -t " + dateTo.String() + + " -c " + clientName + " 2>&1; " // we don't want stderr output to be logged as errors } script += "\"" -- cgit mrf-deployment