You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pod_name=$(kubectl get po -l controller-uid=`kubectl get job $job_name -o "jsonpath={.metadata.labels.controller-uid}"` | awk 'match($0,!/NAME/) {print $1}')
86
-
echo "GKE pod name: $pod_name"
87
-
echo "Waiting on kubernetes job: $job_name"
88
-
status_code=2 &&
89
-
# Check on the job periodically. Set the status code depending on what happened to the job in Kubernetes.
90
-
printf "Waiting for job to finish: "
91
-
while true; do
92
-
if kubectl get jobs $job_name -o jsonpath='Failed:{.status.failed}' | grep "Failed:1"; then
93
-
status_code=1 && break;
94
-
elif kubectl get jobs $job_name -o jsonpath='Succeeded:{.status.succeeded}' | grep "Succeeded:1"; then
95
-
status_code=0 && break;
96
-
else
97
-
printf ".";
98
-
fi;
99
-
sleep 5;
100
-
done
101
-
echo "Done waiting. Job status code: $status_code"
pod_name=$(kubectl get po -l controller-uid=`kubectl get job $job_name -o "jsonpath={.metadata.labels.controller-uid}"` | awk 'match($0,!/NAME/) {print $1}')
86
+
echo "GKE pod name: $pod_name"
87
+
echo "Waiting on kubernetes job: $job_name"
88
+
status_code=2 &&
89
+
# Check on the job periodically. Set the status code depending on what happened to the job in Kubernetes.
90
+
printf "Waiting for job to finish: "
91
+
while true; do
92
+
if kubectl get jobs $job_name -o jsonpath='Failed:{.status.failed}' | grep "Failed:1"; then
93
+
status_code=1 && break;
94
+
elif kubectl get jobs $job_name -o jsonpath='Succeeded:{.status.succeeded}' | grep "Succeeded:1"; then
95
+
status_code=0 && break;
96
+
else
97
+
printf ".";
98
+
fi;
99
+
sleep 5;
100
+
done
101
+
echo "Done waiting. Job status code: $status_code"
0 commit comments