File tree 1 file changed +28
-0
lines changed
1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Set namespace and remote base directory
4
+ NAMESPACE=" zk-evm"
5
+ REMOTE_BASE_DIR=" /opt/prover_cli"
6
+ LOCAL_BASE_DIR=" /tmp"
7
+
8
+ # Automatically detect the jumpbox pod name
9
+ JUMPBOX_POD_NAME=$( kubectl get pods --namespace " $NAMESPACE " -o=jsonpath=' {range .items[*]}{.metadata.name}{"\n"}{end}' | grep zk-evm-jumpbox)
10
+
11
+ # Check if the pod name was detected
12
+ if [ -z " $JUMPBOX_POD_NAME " ]; then
13
+ echo " Error: Could not find a pod with the name containing 'zk-evm-jumpbox'."
14
+ exit 1
15
+ fi
16
+
17
+ echo " Detected jumpbox pod: $JUMPBOX_POD_NAME "
18
+
19
+ # Directories to copy
20
+ DIRECTORIES=(" plots" " metrics" " reports" )
21
+
22
+ # Loop through each directory and copy it
23
+ for DIR in " ${DIRECTORIES[@]} " ; do
24
+ echo " Copying ${DIR} from pod ${JUMPBOX_POD_NAME} ..."
25
+ kubectl cp " ${NAMESPACE} /${JUMPBOX_POD_NAME} :${REMOTE_BASE_DIR} /${DIR} " " ${LOCAL_BASE_DIR} /${DIR} "
26
+ done
27
+
28
+ echo " All files have been copied successfully."
You can’t perform that action at this time.
0 commit comments