Skip to content

Commit

Permalink
Print cloud build logs when the task fails (#1989)
Browse files Browse the repository at this point in the history
* Print cloud build logs when the task fails

* Add comment about why cloud build is made async
  • Loading branch information
Bobgy authored and k8s-ci-robot committed Sep 4, 2019
1 parent cf681cb commit 3d2b0ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/check-build-image-status.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ if [ "$IMAGES_BUILDING" == true ]; then
NEW_PENDING_BUILD_IDS+=( "$id" )
;;
*)
echo "Fetching build log for build $id"
gcloud builds log "$id" || echo "Fetching build log failed"
# Intentionally placed this status echo at the end, because when a
# developer is looking at logs, sth at the end is most discoverable.
echo "Cloud build with build id ${id} failed with status ${status}"
exit 1
;;
Expand Down
2 changes: 2 additions & 0 deletions test/presubmit-tests-with-pipeline-deployment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@ echo "presubmit test starts"
time source "${DIR}/test-prep.sh"
echo "test env prepared"

# We don't wait for image building here, because cluster can be deployed in
# parallel so that we save a few minutes of test time.
time source "${DIR}/build-images.sh"
echo "KFP images cloudbuild jobs submitted"

Expand Down

0 comments on commit 3d2b0ae

Please sign in to comment.