File tree Expand file tree Collapse file tree 5 files changed +187
-71
lines changed Expand file tree Collapse file tree 5 files changed +187
-71
lines changed Original file line number Diff line number Diff line change 1
1
steps :
2
2
- label : " :bash: Plugin"
3
3
plugins :
4
- docker-compose#v3.9 .0:
4
+ docker-compose#v4.2 .0:
5
5
run : plugin
6
6
- label : " :ruby: Ruby"
7
7
plugins :
8
- docker-compose#v3.9 .0:
8
+ docker-compose#v4.2 .0:
9
9
run : ruby
10
10
- label : " ✨ Lint"
11
11
plugins :
12
12
plugin-linter#v3.0.0:
13
13
id : junit-annotate
14
14
- label : " :bash: Shellcheck"
15
15
plugins :
16
- shellcheck#v1.2 .0:
16
+ shellcheck#v1.3 .0:
17
17
files : hooks/*
Original file line number Diff line number Diff line change 1
1
version : ' 2'
2
2
services :
3
3
plugin :
4
- image : buildkite/plugin-tester:latest@sha256:476a1024936901889147f53d2a3d8e71e99d76404972d583825514f5608083dc
4
+ image : buildkite/plugin-tester:v3.0.1
5
5
volumes :
6
6
- " .:/plugin"
7
7
depends_on :
Original file line number Diff line number Diff line change 2
2
3
3
set -euo pipefail
4
4
5
+ if [[ -z " ${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_ARTIFACTS:- } " ]]; then
6
+ echo " 🚨 Missing artifacts configuration for the plugin"
7
+ exit 1
8
+ fi
9
+
5
10
PLUGIN_DIR=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) /.."
6
11
MAX_SIZE=1024 # in KB
7
12
8
- echo " --- :junit: Download the junits"
9
-
10
13
artifacts_dir=" $( pwd) /$( mktemp -d " junit-annotate-plugin-artifacts-tmp.XXXXXXXXXX" ) "
11
14
annotation_dir=" $( pwd) /$( mktemp -d " junit-annotate-plugin-annotation-tmp.XXXXXXXXXX" ) "
12
15
annotation_path=" ${annotation_dir} /annotation.md"
@@ -26,9 +29,11 @@ function check_size {
26
29
27
30
trap cleanup EXIT
28
31
29
- buildkite-agent artifact download \
30
- " ${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_ARTIFACTS} " \
31
- " $artifacts_dir "
32
+ echo " --- :junit: Download the junits"
33
+ if ! buildkite-agent artifact download " ${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_ARTIFACTS} " " $artifacts_dir " ; then
34
+ echo " --- :boom: Could not download artifacts"
35
+ exit 2
36
+ fi
32
37
33
38
echo " --- :junit: Processing the junits"
34
39
@@ -45,15 +50,19 @@ docker \
45
50
ruby:2.7-alpine ruby /src/bin/annotate /junits \
46
51
> " $annotation_path "
47
52
48
- if [[ $? -eq 64 ]]; then # special exit code to signal test failures
53
+ exit_code=$?
54
+ set -e
55
+
56
+ if [[ $exit_code -eq 64 ]]; then # special exit code to signal test failures
49
57
annotation_style=" error"
50
58
if [[ " ${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_FAIL_BUILD_ON_ERROR:- false} " =~ (true| on| 1) ]]; then
51
59
fail_build=1
52
60
fi
61
+ elif [[ $exit_code -ne 0 ]]; then
62
+ echo " --- :boom: Error when processing JUnit tests"
63
+ exit $exit_code
53
64
fi
54
65
55
- set -e
56
-
57
66
cat " $annotation_path "
58
67
59
68
if grep -q " <details>" " $annotation_path " ; then
Original file line number Diff line number Diff line change 1
1
{
2
2
"extends" : [
3
- " config:base"
3
+ " config:base" ,
4
+ " :disableDependencyDashboard"
4
5
],
5
6
"bundler" : {
6
7
"enabled" : true
You can’t perform that action at this time.
0 commit comments