Update to clean storage

This commit is contained in:
2025-03-29 19:52:50 +08:00
parent 58a25be171
commit f6dcced18f

View File

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