File tree Expand file tree Collapse file tree 1 file changed +14
-11
lines changed
Expand file tree Collapse file tree 1 file changed +14
-11
lines changed Original file line number Diff line number Diff line change @@ -78,18 +78,21 @@ GCR_IMG=${GCR_REPO}:${KIC_VERSION}
7878DH_IMG=${DH_REPO} :${KIC_VERSION}
7979export KICBASE_IMAGE_REGISTRIES=" ${GCR_IMG} ${DH_IMG} "
8080
81- # Build a new kicbase image
82- CIBUILD=yes make push-kic-base-image | tee kic-logs.txt
83-
84- # Abort with error message if above command failed
85- ec=$?
86- if [ $ec -gt 0 ]; then
87- if [ " $release " = false ]; then
88- gh pr comment ${ghprbPullId} --body " Hi ${ghprbPullAuthorLoginMention} , building a new kicbase image failed.
81+
82+ if ! CIBUILD=yes make push-kic-base-image | tee kic-logs.txt; then
83+ # Exit of `make` (PIPESTATUS[0]); fallback to 1 if unavailable
84+ ec=${PIPESTATUS[0]:- 1}
85+
86+ # Only comment on non-release; default release=false if unset
87+ if [[ ${release:- false} != " true" ]]; then
88+ body=$( cat << EOF
89+ Hi ${ghprbPullAuthorLoginMention} , building a new kicbase image failed.
8990 See the logs at: https://storage.cloud.google.com/minikube-builds/logs/${ghprbPullId} /${ghprbActualCommit:: 7} /kic_image_build.txt
90- "
91- fi
92- exit $ec
91+ EOF
92+ )
93+ gh pr comment " ${ghprbPullId} " --body " $body "
94+ fi
95+ exit " $ec "
9396fi
9497
9598# Retrieve the sha from the new image
You can’t perform that action at this time.
0 commit comments