2
2
3
3
ATOM_SHA=$1
4
4
ACTION_URL=$2
5
+ RUNNER_FILDER=' /home/cephnvme/actions-runner-ceph'
5
6
6
7
cleanup_docker_images () {
7
8
local HOST=$1
15
16
}
16
17
17
18
# Remove previous run data
18
- rm -rf /home/cephnvme/actions-runner-ceph /ceph-nvmeof-atom
19
+ rm -rf $RUNNER_FILDER /ceph-nvmeof-atom
19
20
sudo rm -rf /root/.ssh/atom_backup/artifact/multiIBMCloudServers_m2/*
20
21
21
22
# Check if cluster is busy with another run
35
36
sudo docker ps -q | xargs -r sudo docker stop; sudo docker ps -q | xargs -r sudo docker rm -f; sudo yes | docker system prune -fa; docker ps; docker images
36
37
37
38
# Cloning atom repo
38
- cd /home/cephnvme/actions-runner-ceph
39
+ cd $RUNNER_FILDER
39
40
git clone git@github.ibm.com:NVME-Over-Fiber/ceph-nvmeof-atom.git
40
41
if [ $? -ne 0 ]; then
41
42
echo " Error: Failed to clone the atom repository."
@@ -51,7 +52,7 @@ if [ $? -ne 0 ]; then
51
52
fi
52
53
53
54
# Build atom images based on the cloned repo
54
- docker build -t nvmeof_atom:$ATOM_SHA /home/cephnvme/actions-runner-ceph /ceph-nvmeof-atom
55
+ docker build -t nvmeof_atom:$ATOM_SHA $RUNNER_FILDER /ceph-nvmeof-atom
55
56
if [ $? -ne 0 ]; then
56
57
echo " Error: Failed to build Docker image."
57
58
exit 1
@@ -74,4 +75,11 @@ for HOST in "${HOSTS[@]}"; do
74
75
fi
75
76
done
76
77
77
- sudo podman ps -q | xargs -r sudo podman stop; sudo podman ps -q | xargs -r sudo podman rm -f; sudo yes | podman system prune -fa; podman ps; podman images
78
+ echo " Cleaning up Podman containers and images on installer"
79
+ sudo podman ps -q | xargs -r sudo podman stop
80
+ sudo podman ps -q | xargs -r sudo podman rm -f
81
+ sudo podman rmi -f $( sudo podman images -q)
82
+ sudo yes | podman system prune -fa
83
+ echo " show exist podman images/containers (should be empty)"
84
+ sudo podman ps
85
+ sudo podman images
0 commit comments