File tree Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Expand file tree Collapse file tree 2 files changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -35,9 +35,7 @@ docker \
35
35
36
36
cat " $annotation_path "
37
37
38
- buildkite-agent artifact upload " $annotation_path "
39
-
40
- if ! grep -q " There were no failures" " $annotation_path " ; then
38
+ if grep -q " <details>" " $annotation_path " ; then
41
39
echo " --- :buildkite: Creating annotation"
42
40
# shellcheck disable=SC2002
43
41
cat " $annotation_path " | buildkite-agent annotate --context junit --style error
Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ load "$BATS_PATH/load.bash"
20
20
stub buildkite-agent " artifact download junits/*.xml /plugin/tests/tmp//plugin/junit-artifacts : echo Downloaded artifacts" \
21
21
" annotate --context junit --style error : echo Annotation added"
22
22
23
- stub docker " --log-level error run --rm --volume /plugin/tests/tmp//plugin/junit-artifacts:/junits --volume /plugin/hooks/../ruby:/src --env BUILDKITE_PLUGIN_JUNIT_ANNOTATE_JOB_UUID_FILE_PATTERN= ruby:2.5-alpine /src/bin/annotate /junits : echo ANNOTATION "
23
+ stub docker " --log-level error run --rm --volume /plugin/tests/tmp//plugin/junit-artifacts:/junits --volume /plugin/hooks/../ruby:/src --env BUILDKITE_PLUGIN_JUNIT_ANNOTATE_JOB_UUID_FILE_PATTERN= ruby:2.5-alpine /src/bin/annotate /junits : echo '<details>Failure</details>' "
24
24
25
25
run " $PWD /hooks/command"
26
26
@@ -45,14 +45,12 @@ load "$BATS_PATH/load.bash"
45
45
46
46
stub buildkite-agent " artifact download junits/*.xml /plugin/tests/tmp//plugin/junit-artifacts : echo Downloaded artifacts"
47
47
48
- stub docker " --log-level error run --rm --volume /plugin/tests/tmp//plugin/junit-artifacts:/junits --volume /plugin/hooks/../ruby:/src --env BUILDKITE_PLUGIN_JUNIT_ANNOTATE_JOB_UUID_FILE_PATTERN= ruby:2.5-alpine /src/bin/annotate /junits : echo There were no failures "
48
+ stub docker " --log-level error run --rm --volume /plugin/tests/tmp//plugin/junit-artifacts:/junits --volume /plugin/hooks/../ruby:/src --env BUILDKITE_PLUGIN_JUNIT_ANNOTATE_JOB_UUID_FILE_PATTERN= ruby:2.5-alpine /src/bin/annotate /junits : echo No test errors "
49
49
50
50
run " $PWD /hooks/command"
51
51
52
52
assert_success
53
53
54
- assert_output --partial " There were no failures"
55
-
56
54
unstub mktemp
57
55
unstub buildkite-agent
58
56
unstub docker
You can’t perform that action at this time.
0 commit comments