From d0bfd8b78eb59d10bddc30f89dcbef288f5fcfbe Mon Sep 17 00:00:00 2001 From: Lihan Date: Sat, 27 Jul 2024 15:21:40 -0400 Subject: [PATCH] latest --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 5142de2f8..ff8a76707 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -37,10 +37,10 @@ pipeline { post { always { script { - // Use the saved Docker image ID from the environment if needed if (env.DOCKER_IMAGE_ID) { echo "Stopping and removing Docker Image with ID: ${env.DOCKER_IMAGE_ID}" - docker.rmi(env.DOCKER_IMAGE_ID) + // Using shell command to remove Docker image + sh "docker rmi ${env.DOCKER_IMAGE_ID}" } } }