Skip to content

Commit 210a0bf

Browse files
committed
Add ruby-image option
1 parent 5348c36 commit 210a0bf

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ Default: `0`
6565

6666
Include the specified number of slowest tests in the annotation. The annotation will always be shown.
6767

68+
### `ruby-image` (optional)
69+
70+
The docker image to use for running the analysis code. Must be a valid image reference that can run the corresponding ruby code and the agent running the step must be able to pull it if not already present.
71+
72+
Default: `ruby:3.1-alpine@sha256:a39e26d0598837f08c75a42c8b0886d9ed5cc862c4b535662922ee1d05272fca`
73+
6874
## Developing
6975

7076
To test the plugin hooks (in Bash) and the junit parser (in Ruby):

hooks/command

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ fi
99

1010
PLUGIN_DIR="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd)/.."
1111
MAX_SIZE=1024 # in KB
12+
RUBY_IMAGE="${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_RUBY_IMAGE:-'ruby:3.1-alpine@sha256:a39e26d0598837f08c75a42c8b0886d9ed5cc862c4b535662922ee1d05272fca'}"
1213

1314
artifacts_dir="$(pwd)/$(mktemp -d "junit-annotate-plugin-artifacts-tmp.XXXXXXXXXX")"
1415
annotation_dir="$(pwd)/$(mktemp -d "junit-annotate-plugin-annotation-tmp.XXXXXXXXXX")"
@@ -49,7 +50,7 @@ docker \
4950
--env "BUILDKITE_PLUGIN_JUNIT_ANNOTATE_JOB_UUID_FILE_PATTERN=${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_JOB_UUID_FILE_PATTERN:-}" \
5051
--env "BUILDKITE_PLUGIN_JUNIT_ANNOTATE_FAILURE_FORMAT=${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_FAILURE_FORMAT:-}" \
5152
--env "BUILDKITE_PLUGIN_JUNIT_ANNOTATE_REPORT_SLOWEST=${BUILDKITE_PLUGIN_JUNIT_ANNOTATE_REPORT_SLOWEST:-}" \
52-
ruby:2.7-alpine ruby /src/bin/annotate /junits \
53+
"${RUBY_IMAGE}" ruby /src/bin/annotate /junits \
5354
> "$annotation_path"
5455

5556
exit_code=$?

plugin.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ configuration:
2222
type: string
2323
report-slowest:
2424
type: integer
25+
ruby-image:
26+
type: string
2527
required:
2628
- artifacts
2729
additionalProperties: false

0 commit comments

Comments
 (0)