Skip to content

Commit

Permalink
[CI] Buildkite: Use annotate for test results
Browse files Browse the repository at this point in the history
  • Loading branch information
picandocodigo committed Mar 13, 2023
1 parent 79dcc5a commit ff0a6b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions .buildkite/log-results.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
#
# This script is intended to be run after the build in a Buildkite pipeline
echo "--- Test summary"
buildkite-agent annotate "## :rspec: Tests summary :rspec:
"
buildkite-agent artifact download "elasticsearch-api/tmp/*.html" .

files="elasticsearch-api/tmp/*.html"
Expand All @@ -11,5 +12,7 @@ for f in $files; do
EXAMPLES=`cat $f | grep -o "[0-9]\+ examples\?" | tail -1`
FAILURES=`cat $f | grep -o "[0-9]\+ failures\?" | tail -1`
PENDING=`cat $f | grep -o "[0-9]\+ pending" | tail -1`
echo "+++ :ruby: $RUBY_VERSION :test_tube: $TEST_SUITE :rspec: $EXAMPLES - :x: $FAILURES - :pinched_fingers: $PENDING"
buildkite-agent annotate --style info --append "
:ruby: $RUBY_VERSION :test_tube: $TEST_SUITE :rspec: $EXAMPLES - :x: $FAILURES - :suspect: $PENDING
"
done

0 comments on commit ff0a6b9

Please sign in to comment.