Update clinic/service/Jenkinsfile.AuthService
This commit is contained in:
@@ -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."
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user