Fix Jenkins metrics helper workspace transport
This commit is contained in:
+10
-5
@@ -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/ ;;
|
||||
|
||||
Reference in New Issue
Block a user