ci(jenkins): escape coverage regex in inline python
This commit is contained in:
parent
c1c75733af
commit
cb1ca94f86
2
Jenkinsfile
vendored
2
Jenkinsfile
vendored
@ -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
|
||||||
)"
|
)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user