Skip to content

Commit 6e9bd9c

Browse files
committed
ci: use kubectl_retry instead of kubectl
kubectl is failing due to know github errors trying to replace it with retry so that it successful after sometime. Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
1 parent 111bd82 commit 6e9bd9c

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

test/scripts/github-action-helper.sh

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
set -xeEo pipefail
44

5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"
6+
# shellcheck disable=SC1091
7+
[ ! -e "${SCRIPT_DIR}"/utils.sh ] || source "${SCRIPT_DIR}"/utils.sh
8+
59
#############
610
# VARIABLES #
711
#############
@@ -38,19 +42,20 @@ use_local_disk() {
3842

3943
deploy_rook() {
4044
rook_version="v1.16.1"
41-
kubectl create -f https://raw.githubusercontent.com/rook/rook/$rook_version/deploy/examples/common.yaml
42-
kubectl create -f https://raw.githubusercontent.com/rook/rook/$rook_version/deploy/examples/crds.yaml
45+
kubectl_retry create -f https://raw.githubusercontent.com/rook/rook/$rook_version/deploy/examples/common.yaml
46+
kubectl_retry create -f https://raw.githubusercontent.com/rook/rook/$rook_version/deploy/examples/crds.yaml
4347
curl https://raw.githubusercontent.com/rook/rook/$rook_version/deploy/examples/operator.yaml -o operator.yaml
4448
sed -i 's|ROOK_CSI_DISABLE_DRIVER: "false"|ROOK_CSI_DISABLE_DRIVER: "true"|g' operator.yaml
45-
kubectl create -f operator.yaml
49+
kubectl_retry create -f operator.yaml
4650
wait_for_operator_pod_to_be_ready_state
4751
curl https://raw.githubusercontent.com/rook/rook/$rook_version/deploy/examples/cluster-test.yaml -o cluster-test.yaml
4852
sed -i "s|#deviceFilter:|deviceFilter: ${BLOCK/\/dev\//}|g" cluster-test.yaml
4953
cat cluster-test.yaml
5054
kubectl create -f cluster-test.yaml
55+
kubectl_retry create -f cluster-test.yaml
5156
wait_for_mon
5257
wait_for_pod_to_be_ready_state
53-
kubectl create -f https://raw.githubusercontent.com/rook/rook/$rook_version/deploy/examples/toolbox.yaml
58+
kubectl_retry create -f https://raw.githubusercontent.com/rook/rook/$rook_version/deploy/examples/toolbox.yaml
5459
}
5560

5661
wait_for_pod_to_be_ready_state() {

0 commit comments

Comments
 (0)