diff --git a/test/cases/diff-manifests.sh b/test/cases/diff-manifests.sh index 697e13e8f..3e9ee8820 100755 --- a/test/cases/diff-manifests.sh +++ b/test/cases/diff-manifests.sh @@ -71,6 +71,12 @@ greenprint "Generating all manifests for merge-base (${mergebase})" # be broken in a PR that fixes it. # As long as the generation on the PR HEAD succeeds, the job should succeed. go run ./cmd/gen-manifests --output "${manifestdir}/${mergebase}" --workers 50 +err=$? +merge_base_fail="" +if (( err != 0 )); then + greenprint "Manifest generation on merge-base failed" + merge_base_fail="**NOTE:** Manifest generation on merge-base with \`main\` (${mergebase}) failed.\n\n" +fi greenprint "Diff: ${manifestdir}/${mergebase} ${manifestdir}/PR" diff=$(diff -Naur "${manifestdir}"/"${mergebase}" "${manifestdir}/PR") @@ -90,7 +96,7 @@ greenprint "Saved diff in job artifacts" artifacts_url="${CI_JOB_URL}/artifacts/browse/ci-artifacts" cat > "${review_data_file}" << EOF -{"body":"⚠️ This PR introduces changes in at least one manifest (when comparing PR HEAD ${head} with the main merge-base ${mergebase}). Please review the changes. The changes can be found in the [artifacts of the \`Manifest-diff\` job [0]](${artifacts_url}) as \`manifests.diff\`.\n\n[0] ${artifacts_url}","event":"COMMENT"} +{"body":"⚠️ This PR introduces changes in at least one manifest (when comparing PR HEAD ${head} with the main merge-base ${mergebase}). Please review the changes. The changes can be found in the [artifacts of the \`Manifest-diff\` job [0]](${artifacts_url}) as \`manifests.diff\`.\n\n${merge_base_fail}[0] ${artifacts_url}","event":"COMMENT"} EOF greenprint "Posting review comment"