Skip to content

Commit

Permalink
update container cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ebattat committed Feb 14, 2024
1 parent ecdc407 commit 8e38a61
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 3 additions & 3 deletions jenkins/PerfCI_OpenShift_Deployment/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ pipeline {
sudo podman rmi -f $(sudo podman images -q quay.io/ebattat/benchmark-runner 2> /dev/null)
fi
'''
sh 'sudo podman volume ls -q | sudo xargs -r podman volume rm'
# containers cleanup: must be done for Jetlag containers and also to avoid reaching to container storage leak
sh 'podman ps | awk '{print $1}' | xargs -I % podman stop %; podman ps -a | awk '{print $1}' | xargs -I % podman rm %; podman pod ps | awk '{print $1}' | xargs -I % podman pod rm % 2>&1'
}
}
}

stage('⚙️ SET SSH key') {
stage('⚙️ SET SSH key') {
steps {
script {
sh 'mkdir -p $WORKSPACE/.ssh/'
Expand Down Expand Up @@ -113,7 +114,6 @@ END
sudo podman rmi -f $(sudo podman images -q quay.io/ebattat/benchmark-runner 2> /dev/null)
fi
'''
sh 'sudo podman volume ls -q | sudo xargs -r podman volume rm'
}
}
failure {
Expand Down
2 changes: 0 additions & 2 deletions jenkins/PerfCI_Operators_Deployment/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ pipeline {
sudo podman rmi -f $(sudo podman images -q quay.io/ebattat/benchmark-runner 2> /dev/null)
fi
'''
sh 'sudo podman volume ls -q | sudo xargs -r podman volume rm'
}
}
}
Expand Down Expand Up @@ -137,7 +136,6 @@ END
sudo podman rmi -f $(sudo podman images -q quay.io/ebattat/benchmark-runner 2> /dev/null)
fi
'''
sh 'sudo podman volume ls -q | sudo xargs -r podman volume rm'
}
}
failure {
Expand Down

0 comments on commit 8e38a61

Please sign in to comment.