diff --git a/hooks/command b/hooks/command index 3c484b5..0fd542e 100755 --- a/hooks/command +++ b/hooks/command @@ -59,7 +59,9 @@ cat "$annotation_path" if grep -q "
" "$annotation_path"; then if ! check_size; then echo "--- :warning: Failures too large to annotate" - echo "The failures are too large to create a build annotation. Please inspect the failed JUnit artifacts manually." + msg="The failures are too large to create a build annotation. Please inspect the failed JUnit artifacts manually." + echo "$msg" + echo "$msg" | buildkite-agent annotate --context "${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_CONTEXT:-junit}" --style "$annotation_style" else echo "--- :buildkite: Creating annotation" # shellcheck disable=SC2002