From 175e6c8387aed4ff48e1229ea41d4afd11e7753e Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Wed, 25 Oct 2023 21:31:19 +0000 Subject: [PATCH] Update more Signed-off-by: Peter Zhu --- vars/runGradleCheck.groovy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vars/runGradleCheck.groovy b/vars/runGradleCheck.groovy index 68d1a064f..7b6c912b6 100644 --- a/vars/runGradleCheck.groovy +++ b/vars/runGradleCheck.groovy @@ -58,7 +58,8 @@ void call(Map args = [:]) { if command -v docker > /dev/null; then echo "Check existing dockercontainer" docker ps -a - docker_rm_list=`docker ps -qa | grep -v "gradle-check-jenkins-$BUILD_NUMBER"` + docker_gradlecheck_id=`docker ps -a --filter name=gradle-check-jenkins-$BUILD_NUMBER` + docker_rm_list=`docker ps -qa | grep -v \$docker_gradlecheck_id` echo \$docker_rm_list docker stop \$docker_rm_list > /dev/null 2>&1 || echo docker rm --force \$docker_rm_list > /dev/null 2>&1 || echo