Do not print executed commands in loop when checking deployments (#26872)

Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
Martin Bartoš 2024-02-14 19:41:50 +01:00 committed by GitHub
parent bc82929e3a
commit 531b386c97
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 11 additions and 9 deletions

View file

@ -22,6 +22,7 @@ pom.xml ci ci-store operator
federation/sssd/ ci ci-sssd
model/ ci-store
operator/ operator
docs/guides/ guides
docs/documentation/ documentation

View file

@ -1,11 +1,11 @@
#! /bin/bash
set -euxo pipefail
set -euo pipefail
max_retries=240
c=0
while ! kubectl get keycloaks
do
echo "waiting for Keycloak CRD"
echo "$(date +"%T") Waiting for Keycloak CRD"
((c++)) && ((c==max_retries)) && exit -1
sleep 1
done
@ -13,7 +13,7 @@ done
c=0
while ! kubectl get keycloakrealmimports
do
echo "waiting for Keycloak Realm Import CRD"
echo "$(date +"%T") Waiting for Keycloak Realm Import CRD"
((c++)) && ((c==max_retries)) && exit -1
sleep 1
done

View file

@ -1,5 +1,5 @@
#! /bin/bash
set -euxo pipefail
set -euo pipefail
NAMESPACE=${1:-default}
@ -7,7 +7,7 @@ max_retries=500
c=0
while [[ $(kubectl -n $NAMESPACE get keycloaks/example-kc -o jsonpath="{.status.conditions[?(@.type == 'Ready')].status}") != "True" ]]
do
echo "waiting for Keycloak example-kc status"
echo "$(date +"%T") Waiting for Keycloak example-kc status"
((c++)) && ((c==max_retries)) && exit -1
sleep 1
done
@ -15,7 +15,7 @@ done
c=0
while [[ $(kubectl -n $NAMESPACE get keycloakrealmimports/example-count0-kc -o jsonpath="{.status.conditions[?(@.type == 'Done')].status}") != "True" ]]
do
echo "waiting for Keycloak Realm Import example-count0-kc status"
echo "$(date +"%T") Waiting for Keycloak Realm Import example-count0-kc status"
((c++)) && ((c==max_retries)) && exit -1
sleep 1
done

View file

@ -1,11 +1,11 @@
#! /bin/bash
set -euxo pipefail
set -euo pipefail
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
INSTALL_NAMESPACE=${1:-default}
# Delete the default catalog if it exists
echo "$(date +"%T") Delete the default catalog if it exists"
sh -c "kubectl delete catalogsources operatorhubio-catalog -n olm | true"
kubectl apply -f $SCRIPT_DIR/../olm/testing-resources/catalog.yaml
@ -15,10 +15,11 @@ max_retries=200
c=0
while [[ $(kubectl get catalogsources test-catalog -o jsonpath="{.status.connectionState.lastObservedState}") != "READY" ]]
do
echo "waiting for the test-catalog to be ready"
echo "$(date +"%T") Waiting for the test-catalog to be ready"
((c++)) && ((c==max_retries)) && exit -1
sleep 1
done
echo "$(date +"%T") The test-catalog is ready"
kubectl apply -f $SCRIPT_DIR/../olm/testing-resources/operatorgroup.yaml -n $INSTALL_NAMESPACE
kubectl apply -f $SCRIPT_DIR/../olm/testing-resources/subscription.yaml -n $INSTALL_NAMESPACE