Skip to content

Commit

Permalink
Merge pull request #14467 from wking/gather-gcp-console-fixups
Browse files Browse the repository at this point in the history
ci-operator/step-registry/gather: Exclude empty-string "instance IDs"
  • Loading branch information
openshift-merge-robot committed Jan 5, 2021
2 parents 96a695a + 7e1a515 commit 0c85325
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ then
cat "${SHARED_DIR}/gcp-instance-ids.txt" >> "${TMPDIR}/node-provider-IDs.txt"
fi

cat "${TMPDIR}/node-provider-IDs.txt" | sort | uniq | while read -r INSTANCE_ID
cat "${TMPDIR}/node-provider-IDs.txt" | sort | grep . | uniq | while read -r INSTANCE_ID
do
echo "Finding the zone for ${INSTANCE_ID}"
ZONE="$(
Expand All @@ -43,6 +43,7 @@ do
if test -z "${ZONE}"
then
echo "No zone found for ${INSTANCE_ID}, so not attempting to gather console logs"
continue
fi
echo "Gathering console logs for ${INSTANCE_ID} from ${ZONE}"
gcloud --format json compute instances get-serial-port-output --zone "${ZONE}" "${INSTANCE_ID}" > "${ARTIFACT_DIR}/${INSTANCE_ID}.json" &
Expand Down

0 comments on commit 0c85325

Please sign in to comment.