diff --git a/hack/jenkins/build_iso.sh b/hack/jenkins/build_iso.sh index acbf29fe51..e94d4acc35 100755 --- a/hack/jenkins/build_iso.sh +++ b/hack/jenkins/build_iso.sh @@ -66,22 +66,20 @@ else fi if ! make release-iso 2>&1 | tee iso-logs.txt; then - # Exit of `make` (PIPESTATUS[0]); fallback to 1 if unavailable - ec=${PIPESTATUS[0]:-1} + # Exit of `make` (PIPESTATUS[0]); fallback to 1 if unavailable + ec=${PIPESTATUS[0]:-1} - # Only comment on non-release; default release=false if unset - if [[ ${release:-false} != "true" ]]; then - body="$(cat <<'EOF' - Hi ${ghprbPullAuthorLoginMention}, building a new ISO failed for Commit ${ghprbActualCommit} - See the logs at: - https://storage.cloud.google.com/minikube-builds/logs/${ghprbPullId}/${ghprbActualCommit::7}/iso_build.txt - EOF - " - - gh pr comment "${ghprbPullId}" --body "$body" - - fi - exit "$ec" + # Only comment on non-release; default release=false if unset + if [[ ${release:-false} != "true" ]]; then + body=$(cat << EOF +Hi ${ghprbPullAuthorLoginMention}, building a new ISO failed for Commit ${ghprbActualCommit} +See the logs at: +https://storage.cloud.google.com/minikube-builds/logs/${ghprbPullId}/${ghprbActualCommit::7}/iso_build.txt +EOF +) + gh pr comment "${ghprbPullId}" --body "$body" + fi + exit "$ec" fi git config user.name "minikube-bot"