Update clinic/service/Jenkinsfile.Web

This commit is contained in:
2025-03-29 19:55:00 +08:00
parent f65b356b27
commit f6eac49aea

View File

@@ -100,12 +100,21 @@ pipeline {
} else {
echo "No Docker image to clean up"
}
// Clean up dangling images and build cache
sh "docker image prune -f || echo 'No dangling images to prune'"
sh "docker builder prune -f || echo 'No build cache to prune'"
// Clean up npm artifacts
sh "rm -rf node_modules build || echo 'No npm artifacts to clean'"
}
}
}
}
post {
always {
// Ensure workspace is cleaned up after every run
cleanWs()
}
failure {
echo "Pipeline failed! Check the logs for details."
}