mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-28 08:54:05 +00:00
Update Jenkinsfile
This commit is contained in:
Vendored
+20
-1
@@ -107,10 +107,29 @@ pipeline {
|
||||
steps {
|
||||
script {
|
||||
try {
|
||||
sh 'docker image prune -a -f'
|
||||
sh '''
|
||||
echo "Starting Docker cleanup..."
|
||||
|
||||
# Remove stopped containers
|
||||
docker container prune -f
|
||||
|
||||
# Remove unused networks
|
||||
docker network prune -f
|
||||
|
||||
# Remove unused images
|
||||
docker image prune -a -f
|
||||
|
||||
# Remove unused build cache
|
||||
docker builder prune -f
|
||||
|
||||
echo "Docker cleanup completed."
|
||||
|
||||
docker system df
|
||||
'''
|
||||
} catch (Exception e) {
|
||||
echo "Error during cleanup: ${e.message}"
|
||||
}
|
||||
|
||||
currentBuild.description = 'Step 6 of 6 Completed'
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user