From 17ed93da76484e118cacc0e05381daf799985af6 Mon Sep 17 00:00:00 2001 From: Maxim Kuvyrkov Date: Sun, 27 Jun 2021 07:02:59 +0000 Subject: prepare-board.sh: Rely on tcwg-update-bmk-containers ... to start jenkins containers on bmk boards. Change-Id: Ia9d60dddc7dc0e096d3aa234c5774bfecb29839d --- prepare-board.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'prepare-board.sh') diff --git a/prepare-board.sh b/prepare-board.sh index 358c88a..f2c7d21 100755 --- a/prepare-board.sh +++ b/prepare-board.sh @@ -477,9 +477,24 @@ configure_docker() fi fi + local cnt_name for cnt in $(docker ps -q); do docker stop $cnt - echo $cnt >> "$restore_file" + cnt_name=$(docker inspect -f "{{.Name}}" $cnt) + if [ -f "/home/tcwg-buildslave/jenkins/$cnt_name.secret" ]; then + # Do not restart jenkins node containers after benchmarking. + # Restarting them without grabbing the board lock will + # give pending jobs only a few seconds to execute before + # the next benchmarking job grabs the board and stops + # the container. + # We have a dedicated job -- tcwg-update-bmk-containers -- + # which starts jenkins containers on benchmarking boards + # and waits for all pending jobs to finish before releasing + # the board back to benchmarking. + : + else + echo $cnt >> "$restore_file" + fi done elif [ "$op" = "stop_board" ]; then for cnt in $(docker ps -q -f status=exited); do -- cgit v1.2.3