Skip to content

Commit

Permalink
Merge pull request rook#38 from subhamkrai/fix-ci
Browse files Browse the repository at this point in the history
ci: fix ci issues
  • Loading branch information
BlaineEXE authored Jul 20, 2022
2 parents 7ea1358 + 75ea6c7 commit 256ca02
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci-for-default-ns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ jobs:
kubectl rook_ceph ceph status
kubectl rook_ceph ceph status -f json
kubectl rook_ceph ceph status --format json-pretty
POD=$(kubectl -n rook-ceph get pod -l app=rook-ceph-operator -o jsonpath="{.items[0].metadata.name}")
kubectl rook_ceph operator restart
# let's wait for operator pod to be restart
kubectl -n rook-ceph wait --for=delete pod/$POD --timeout=100s
tests/github-action-helper.sh wait_for_operator_pod_to_be_ready_state_default
kubectl rook_ceph operator set ROOK_LOG_LEVEL DEBUG
kubectl rook_ceph --context=$(kubectl config current-context) mons
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci-for-diff-ns.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,11 @@ jobs:
kubectl rook_ceph -o test-operator -n test-cluster ceph status
kubectl rook_ceph -o test-operator -n test-cluster ceph status -f json
kubectl rook_ceph -o test-operator -n test-cluster ceph status --format json-pretty
POD=$(kubectl -n test-operator get pod -l app=rook-ceph-operator -o jsonpath="{.items[0].metadata.name}")
kubectl rook_ceph -o test-operator -n test-cluster operator restart
# let's wait for operator pod to be restart
kubectl -n test-operator wait --for=delete pod/$POD --timeout=100s
tests/github-action-helper.sh wait_for_operator_pod_to_be_ready_state_custom
kubectl rook_ceph -o test-operator -n test-cluster operator set ROOK_LOG_LEVEL DEBUG
kubectl rook_ceph -o test-operator -n test-cluster --context=$(kubectl config current-context) mons
Expand Down
4 changes: 2 additions & 2 deletions tests/github-action-helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ EOF
}

wait_for_operator_pod_to_be_ready_state_default() {
timeout 10 bash <<-'EOF'
timeout 100 bash <<-'EOF'
until [ $(kubectl get pod -l app=rook-ceph-operator -n rook-ceph -o jsonpath='{.items[*].metadata.name}' -o custom-columns=READY:status.containerStatuses[*].ready | grep -c true) -eq 1 ]; do
echo "waiting for the operator to be in ready state"
sleep 1
Expand All @@ -94,7 +94,7 @@ EOF
}

wait_for_operator_pod_to_be_ready_state_custom() {
timeout 10 bash <<-'EOF'
timeout 100 bash <<-'EOF'
until [ $(kubectl get pod -l app=rook-ceph-operator -n test-operator -o jsonpath='{.items[*].metadata.name}' -o custom-columns=READY:status.containerStatuses[*].ready | grep -c true) -eq 1 ]; do
echo "waiting for the operator to be in ready state"
sleep 1
Expand Down

0 comments on commit 256ca02

Please sign in to comment.