Integrate real reviewer with measured Actions execution and live Jenkins pipeline
This commit is contained in:
+6
-1
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
# Called on the existing trusted agent. No host socket/network enters this container.
|
||||
set -eu
|
||||
name="ssw590-final-${BUILD_NUMBER:-local}"
|
||||
name="ssw590-final-${JOB_BASE_NAME:-local}-${BUILD_NUMBER:-local}"
|
||||
image='sha256:579106aaffa81dc2436a72a5dbfc51d3590f1a97646321fd38c694aae6d7cba1'
|
||||
case "$1" in
|
||||
start)
|
||||
@@ -11,6 +11,11 @@ case "$1" in
|
||||
docker cp . "$name:/work"
|
||||
docker exec "$name" git config --global --add safe.directory /work
|
||||
;;
|
||||
metrics)
|
||||
docker run --rm -i --network none --memory 64m --memory-swap 64m --cpus .2 \
|
||||
--mount type=bind,src=/home/codex/ssw590-final-metrics,dst=/metrics \
|
||||
--entrypoint python3 "$image" -c 'import os,sys; from pathlib import Path; p=Path("/metrics/final-project.tmp"); p.write_bytes(sys.stdin.buffer.read()); os.replace(p,"/metrics/final-project.prom")' < out/review.prom
|
||||
;;
|
||||
exec) shift; docker exec "$name" "$@" ;;
|
||||
collect) mkdir -p out/collected; docker cp "$name:/work/out/." out/collected/ ;;
|
||||
stop) docker rm -f "$name" ;;
|
||||
|
||||
Reference in New Issue
Block a user