From 72f7e6941f8f9fab5cd96cce4b9aa2b4a1e2b302 Mon Sep 17 00:00:00 2001 From: Brad Stein Date: Sun, 5 Apr 2026 14:14:23 -0300 Subject: [PATCH] ci: avoid heredoc in unit tests coverage export --- Jenkinsfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 352e4e9..b5d367a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -124,12 +124,7 @@ spec: coverage="$(go tool cover -func=build/coverage.out | awk '/^total:/ {gsub("%","",$3); print $3}')" fi export GO_COVERAGE="${coverage}" - python3 - <<'"'"'PY'"'"' -import json, os -coverage = float(os.environ.get("GO_COVERAGE", "0") or "0") -with open("build/coverage.json", "w", encoding="utf-8") as handle: - json.dump({"summary": {"percent_covered": coverage}}, handle) -PY + printf '{"summary":{"percent_covered":%s}}\n' "${GO_COVERAGE}" > "${COVERAGE_JSON}" exit ${test_rc} ''' }