update to clean storage

This commit is contained in:
2025-03-29 19:53:12 +08:00
parent f6dcced18f
commit f65b356b27

View File

@@ -111,12 +111,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 Maven artifacts
sh "mvn clean || echo 'No Maven artifacts to clean'"
}
}
}
}
post {
always {
// Ensure workspace is cleaned up after every run
cleanWs()
}
failure {
echo "Pipeline failed! Check the logs for details."
}