Skip to content

Commit da91dba

Browse files
committed
Simpler way of copying ruby file to current dir
1 parent 1aacc79 commit da91dba

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

hooks/command

+5-5
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ buildkite-agent artifact download \
3030
echo "--- :junit: Processing the junits"
3131

3232
# Move ruby code to current dir so we can mount it
33-
plugin_ruby_dir="$(cd "$( dirname "${BASH_SOURCE[0]}" )/../ruby" && pwd)"
34-
ruby_dir="$(pwd)/$(mktemp -d "junit-annotate-plugin-ruby-tmp.XXXXXXXXXX")"
35-
cp -R "${plugin_ruby_dir}" "${ruby_dir}"
33+
annotate_src="${BASH_SOURCE%/*}/../ruby/bin/annotate"
34+
annotate_path="${PWD}/.buildkite/bin/annotate-tests"
35+
cp -a "${annotate_src}" "${annotate_path}"
3636

3737
docker \
3838
--log-level "error" \
3939
run \
4040
--rm \
41+
--volume "${annotate_path}:/usr/local/bin/anotate-tests" \
4142
--volume "${artifacts_dir}:/junits" \
42-
--volume "${ruby_dir}/ruby:/src" \
43-
ruby:2.7-alpine ruby /src/bin/annotate /junits \
43+
ruby:2.7-alpine ruby /usr/local/bin/anotate-tests /junits \
4444
> "$annotation_path"
4545

4646
cat "$annotation_path"

0 commit comments

Comments
 (0)