@@ -8,27 +8,23 @@ buildkite-agent artifact download "elasticsearch-api/tmp/*" .
88files=" elasticsearch-api/tmp/*.log"
99for f in $files ; do
1010 RUBY_VERSION=` echo $f | grep -Po " (j?ruby-|\d+\.)+\d+" | tail -1`
11+ TRANSPORT_VERSION=` echo $f | grep -Po " transport-([\d.]+)" `
1112 buildkite-agent annotate --append "
12- :ruby: $RUBY_VERSION :test_tube:
13+ :ruby: $RUBY_VERSION :phone: $TRANSPORT_VERSION :test_tube:
14+
15+ ` tail --lines=2 $f | awk -F " -- :" ' {print $2}' `
1316"
17+
18+ FAILED_TESTS=` grep " E," $f `
19+ if [[ -n " $FAILED_TESTS " ]]; then
20+ buildkite-agent annotate --append " #### Failures in $f "
21+ buildkite-agent annotate --append ` grep " E," tmp/es-9.0.0-transport-8.3-jruby-9.4.8.0.log | awk -F ' -- :' ' {print $2}' `
22+ fi
23+
24+ # Summary:
1425 #
1526 # We need the second part of the logs, so we use "-- :" as a field separator in awk
1627 # I, [2024-11-19T09:54:00.190519 #342490] INFO -- : ⏲ Elapsed time: 00:01:31
1728 #
18- buildkite-agent annotate --apend ` awk -F " -- :" ' {print $2}' $f `
19-
20- # TODO: Failed tests:
21- FAILED_TESTS=` awk ' BEGIN { FS = " | "}; /\| failed \|/{ print $1 }' $f | uniq`
22- if [[ -n " $FAILED_TESTS " ]]; then
23- buildkite-agent annotate --append "
24- #### Failures in $f
25- "
26- FAILURES_ARRAY=($( echo $FAILED_TESTS | tr ' ' " \n" ) )
27- for f in " ${FAILURES_ARRAY[@]} "
28- do
29- buildkite-agent annotate --append "
30- - $f
31- "
32- done
33- fi
29+ tail --lines=2 $f | awk -F " -- :" ' {print $2}' | xargs buildkite-agent annotate --append
3430done
0 commit comments