ci(jenkins): escape coverage regex in inline python

This commit is contained in:
Brad Stein 2026-04-18 17:29:50 -03:00
parent c1c75733af
commit cb1ca94f86

2
Jenkinsfile vendored
View File

@ -95,7 +95,7 @@ from pathlib import Path
log_path = Path("build/quality-gate.out") log_path = Path("build/quality-gate.out")
text = log_path.read_text(encoding="utf-8", errors="ignore") if log_path.exists() else "" text = log_path.read_text(encoding="utf-8", errors="ignore") if log_path.exists() else ""
values = [float(match.group(1)) for match in re.finditer(r"([0-9]+(?:\.[0-9]+)?)%", text)] values = [float(match.group(1)) for match in re.finditer(r"([0-9]+(?:\\.[0-9]+)?)%", text)]
print(values[-1] if values else 0.0) print(values[-1] if values else 0.0)
PY PY
)" )"