Fix Jenkins metrics helper workspace transport
myfileagent-python-ci/pipeline/head This commit looks good
Final project review (live) / review (push) Successful in 1m27s

This commit is contained in:
Codex Agent
2026-11-28 21:55:13 +00:00
parent 32a3c6f3f0
commit e736799925
3 changed files with 64 additions and 10 deletions
+10 -5
View File
@@ -13,13 +13,18 @@ case "$1" in
;;
metrics)
version="${2:?release version required for measured metrics}"
docker run --rm --network none --memory 64m --memory-swap 64m --cpus .2 \
# The Jenkins workspace lives inside the agent container's Docker volume.
# Stream these four small inputs instead of trying to bind its path on the host.
tar -cf - ci/publish_live_metrics.py out/verified/review.json \
out/verified/bundle.json out/review.prom | docker run --rm -i --network none \
--memory 64m --memory-swap 64m --cpus .2 \
--read-only --tmpfs /tmp:rw,nosuid,noexec,size=8m \
--mount type=bind,src=/home/codex/ssw590-final-metrics,dst=/metrics \
--mount type=bind,src="$PWD",dst=/work,readonly --workdir /work \
-e PYTHONDONTWRITEBYTECODE=1 --entrypoint python3 "$image" \
ci/publish_live_metrics.py --metrics-dir /metrics --review out/verified/review.json \
--bundle out/verified/bundle.json --gauges out/review.prom --version "$version"
--workdir /tmp -e PYTHONDONTWRITEBYTECODE=1 --entrypoint sh "$image" \
-c 'mkdir -p /tmp/work && tar -xf - -C /tmp/work && cd /tmp/work && \
python3 ci/publish_live_metrics.py --metrics-dir /metrics \
--review out/verified/review.json --bundle out/verified/bundle.json \
--gauges out/review.prom --version "$1"' sh "$version"
;;
exec) shift; docker exec "$name" "$@" ;;
collect) mkdir -p out/collected; docker cp "$name:/work/out/." out/collected/ ;;