Skip to content

Commit 3012fa0

Browse files
xinredhatRoming22
authored andcommitted
Print debug log for OCP deployment
1 parent ce1c9a9 commit 3012fa0

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.tekton/pipeline/acceptance-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ spec:
113113
when:
114114
- input: "$(tasks.deploy-cluster.status)"
115115
operator: notin
116-
values: ["None"]
116+
values: ["None", "Failed"]
117117
params:
118118
- name: cluster-name
119119
value: "$(tasks.generate-cluster-name.results.cluster-name)"

.tekton/pipeline/upgrade-tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ spec:
199199
when:
200200
- input: "$(tasks.deploy-cluster.status)"
201201
operator: notin
202-
values: ["None"]
202+
values: ["None", "Failed"]
203203
params:
204204
- name: cluster-name
205205
value: "$(tasks.generate-cluster-name.results.cluster-name)"

ci/images/ci-runner/hack/bin/deploy-cluster.sh

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ source "$SCRIPT_DIR/utils.sh"
1313

1414
print_debug_info() {
1515
printf "Print debug info......\n" | indent 2
16-
rosa describe cluster --cluster="$CLUSTER_NAME"
16+
rosa --region "$REGION" describe cluster --cluster="$CLUSTER_NAME"
1717
}
1818

1919
# Check all of clusteroperators are AVAILABLE
@@ -23,7 +23,7 @@ check_clusteroperators() {
2323
for operator in $operators; do
2424
# need to check if the operator is available or not in a loop
2525
retries=0
26-
max_retries=10
26+
max_retries=25
2727
# if the operator is not available, wait 60s and check again
2828
while [ "$retries" -lt "$max_retries" ]; do
2929
available=$(kubectl get co "$operator" -o jsonpath='{.status.conditions[?(@.type=="Available")].status}')
@@ -37,6 +37,10 @@ check_clusteroperators() {
3737
# if the operator is still not available after 10 times, exit 1
3838
if [ "$retries" -eq "$max_retries" ]; then
3939
echo "Operator $operator is not available" >&2
40+
# print the status of all cluster operators
41+
kubectl get co
42+
# print the status of the failed cluster operator
43+
kubectl get co "$operator" -o yaml
4044
exit 1
4145
fi
4246
done
@@ -70,7 +74,7 @@ deploy_cluster() {
7074
api_url="$(echo "$admin_output" | grep -oP '(?<=oc login ).*(?= --username)')"
7175

7276
# Use the admin account to login to the cluster in a loop until the account is active.
73-
max_retries=5
77+
max_retries=10
7478
retries=0
7579
export KUBECONFIG="$KUBECONFIG_DIR/kubeconfig"
7680
while ! oc login "$api_url" --username "$admin_user" --password "$admin_pass" > /dev/null 2>&1; do

developer/images/dependencies-update/hack/bin/tasks/update_binaries.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ run_task() {
3737
for BINARY in "${BINARIES[@]}"; do
3838
update_binary
3939
done
40-
if [ $(git diff shared/config/dependencies.sh | wc -l) != "0" ]; then
40+
if [ "$(git diff shared/config/dependencies.sh | wc -l)" != "0" ]; then
4141
git diff shared/config/dependencies.sh \
4242
| grep "^+export" \
4343
| sed -e "s:^+export:-:" -e "s:_VERSION=: to :" \

developer/images/dependencies-update/hack/bin/update.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ prepare_branch(){
109109

110110
show_summary(){
111111
local updated="false"
112-
if ! git diff --quiet $START_COMMIT..HEAD; then
112+
if ! git diff --quiet "$START_COMMIT"..HEAD; then
113113
updated="true"
114114
fi
115115

0 commit comments

Comments
 (0)