Do not print executed commands in loop when checking deployments (#26872)
Signed-off-by: Martin Bartoš <mabartos@redhat.com>
This commit is contained in:
parent
bc82929e3a
commit
531b386c97
4 changed files with 11 additions and 9 deletions
1
.github/actions/conditional/conditions
vendored
1
.github/actions/conditional/conditions
vendored
|
@ -22,6 +22,7 @@ pom.xml ci ci-store operator
|
||||||
federation/sssd/ ci ci-sssd
|
federation/sssd/ ci ci-sssd
|
||||||
|
|
||||||
model/ ci-store
|
model/ ci-store
|
||||||
|
operator/ operator
|
||||||
|
|
||||||
docs/guides/ guides
|
docs/guides/ guides
|
||||||
docs/documentation/ documentation
|
docs/documentation/ documentation
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
set -euxo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
max_retries=240
|
max_retries=240
|
||||||
c=0
|
c=0
|
||||||
while ! kubectl get keycloaks
|
while ! kubectl get keycloaks
|
||||||
do
|
do
|
||||||
echo "waiting for Keycloak CRD"
|
echo "$(date +"%T") Waiting for Keycloak CRD"
|
||||||
((c++)) && ((c==max_retries)) && exit -1
|
((c++)) && ((c==max_retries)) && exit -1
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
@ -13,7 +13,7 @@ done
|
||||||
c=0
|
c=0
|
||||||
while ! kubectl get keycloakrealmimports
|
while ! kubectl get keycloakrealmimports
|
||||||
do
|
do
|
||||||
echo "waiting for Keycloak Realm Import CRD"
|
echo "$(date +"%T") Waiting for Keycloak Realm Import CRD"
|
||||||
((c++)) && ((c==max_retries)) && exit -1
|
((c++)) && ((c==max_retries)) && exit -1
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
set -euxo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
NAMESPACE=${1:-default}
|
NAMESPACE=${1:-default}
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@ max_retries=500
|
||||||
c=0
|
c=0
|
||||||
while [[ $(kubectl -n $NAMESPACE get keycloaks/example-kc -o jsonpath="{.status.conditions[?(@.type == 'Ready')].status}") != "True" ]]
|
while [[ $(kubectl -n $NAMESPACE get keycloaks/example-kc -o jsonpath="{.status.conditions[?(@.type == 'Ready')].status}") != "True" ]]
|
||||||
do
|
do
|
||||||
echo "waiting for Keycloak example-kc status"
|
echo "$(date +"%T") Waiting for Keycloak example-kc status"
|
||||||
((c++)) && ((c==max_retries)) && exit -1
|
((c++)) && ((c==max_retries)) && exit -1
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
@ -15,7 +15,7 @@ done
|
||||||
c=0
|
c=0
|
||||||
while [[ $(kubectl -n $NAMESPACE get keycloakrealmimports/example-count0-kc -o jsonpath="{.status.conditions[?(@.type == 'Done')].status}") != "True" ]]
|
while [[ $(kubectl -n $NAMESPACE get keycloakrealmimports/example-count0-kc -o jsonpath="{.status.conditions[?(@.type == 'Done')].status}") != "True" ]]
|
||||||
do
|
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
|
((c++)) && ((c==max_retries)) && exit -1
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
done
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
set -euxo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
|
||||||
|
|
||||||
INSTALL_NAMESPACE=${1:-default}
|
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"
|
sh -c "kubectl delete catalogsources operatorhubio-catalog -n olm | true"
|
||||||
|
|
||||||
kubectl apply -f $SCRIPT_DIR/../olm/testing-resources/catalog.yaml
|
kubectl apply -f $SCRIPT_DIR/../olm/testing-resources/catalog.yaml
|
||||||
|
@ -15,10 +15,11 @@ max_retries=200
|
||||||
c=0
|
c=0
|
||||||
while [[ $(kubectl get catalogsources test-catalog -o jsonpath="{.status.connectionState.lastObservedState}") != "READY" ]]
|
while [[ $(kubectl get catalogsources test-catalog -o jsonpath="{.status.connectionState.lastObservedState}") != "READY" ]]
|
||||||
do
|
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
|
((c++)) && ((c==max_retries)) && exit -1
|
||||||
sleep 1
|
sleep 1
|
||||||
done
|
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/operatorgroup.yaml -n $INSTALL_NAMESPACE
|
||||||
kubectl apply -f $SCRIPT_DIR/../olm/testing-resources/subscription.yaml -n $INSTALL_NAMESPACE
|
kubectl apply -f $SCRIPT_DIR/../olm/testing-resources/subscription.yaml -n $INSTALL_NAMESPACE
|
||||||
|
|
Loading…
Reference in a new issue