Skip to content

Commit e54fda8

Browse files
authored
Add an annotation when report is too large
This would at least give people a clue as to why there were no annotations but the tests failed.
1 parent 214ea6b commit e54fda8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

hooks/command

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ cat "$annotation_path"
5959
if grep -q "<details>" "$annotation_path"; then
6060
if ! check_size; then
6161
echo "--- :warning: Failures too large to annotate"
62-
echo "The failures are too large to create a build annotation. Please inspect the failed JUnit artifacts manually."
62+
msg="The failures are too large to create a build annotation. Please inspect the failed JUnit artifacts manually."
63+
echo "$msg"
64+
echo "$msg" | buildkite-agent annotate --context "${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_CONTEXT:-junit}" --style "$annotation_style"
6365
else
6466
echo "--- :buildkite: Creating annotation"
6567
# shellcheck disable=SC2002

0 commit comments

Comments
 (0)