Skip to content

Commit

Permalink
Update Ruby, gems, and switch Ruby correctly (#15)
Browse files Browse the repository at this point in the history
If rbenv is available, switch to the corresponding Ruby
  • Loading branch information
mlarraz authored Sep 4, 2024
1 parent 457b321 commit a8aa7be
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.7.6
3.3.0
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ruby:2.7.6-alpine
FROM ruby:3.3.0-alpine

# Fetch/install gems
RUN mkdir -p /opt/gems
Expand Down
68 changes: 39 additions & 29 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,59 +1,69 @@
GEM
remote: https://rubygems.org/
specs:
ast (2.4.0)
ast (2.4.2)
commonmarker (0.17.9)
ruby-enum (~> 0.5)
concurrent-ruby (1.0.5)
diff-lcs (1.5.0)
docile (1.4.0)
diff-lcs (1.5.1)
docile (1.4.1)
haml (5.0.4)
temple (>= 0.8.0)
tilt
i18n (1.0.1)
concurrent-ruby (~> 1.0)
json (2.6.3)
parallel (1.12.1)
parser (2.5.1.0)
ast (~> 2.4.0)
powerpack (0.1.1)
rainbow (3.0.0)
rake (13.0.6)
rexml (3.2.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.0)
json (2.7.2)
language_server-protocol (3.17.0.3)
parallel (1.26.3)
parser (3.3.4.2)
ast (~> 2.4.1)
racc
racc (1.8.1)
rainbow (3.1.1)
rake (13.2.1)
regexp_parser (2.9.2)
rexml (3.3.6)
strscan
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.1)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.1)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-support (3.12.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.1)
rspec_junit_formatter (0.6.0)
rspec-core (>= 2, < 4, != 2.12.0)
rubocop (0.55.0)
rubocop (1.66.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 2.5)
powerpack (~> 0.1)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (~> 1.0, >= 1.0.1)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.32.2)
parser (>= 3.3.1.0)
ruby-enum (0.7.2)
i18n
ruby-progressbar (1.9.0)
simplecov (0.21.2)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.12.3)
simplecov_json_formatter (0.1.4)
strscan (3.1.0)
temple (0.8.0)
tilt (2.0.8)
unicode-display_width (1.3.2)
unicode-display_width (2.5.0)

PLATFORMS
ruby
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Add a build step using the test-summary plugin:
```yaml
- label: annotate
plugins:
- instacart/test-summary#v1.17.0:
- instacart/test-summary#v1.18.0:
inputs:
- label: RSpec
artifact_path: artifacts/rspec*
Expand Down
2 changes: 2 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
#!/usr/bin/env bash
set -euo pipefail

BUNDLE_WITHOUT="development,test"
BUNDLE_FROZEN="true"
bundle install --quiet
3 changes: 2 additions & 1 deletion lib/helpers.bash
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ function on_failure() {
function run_plugin() {
if [[ "${BUILDKITE_PLUGIN_TEST_SUMMARY_RUN_WITHOUT_DOCKER:-false}" = "true" ]]; then
PLUGIN_BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )"
[[ -n `which rbenv` ]] && rbenv shell $(cat $PLUGIN_BASEDIR/.ruby-version)
BUNDLE_GEMFILE="$PLUGIN_BASEDIR/Gemfile" "$PLUGIN_BASEDIR/bin/setup"
BUNDLE_GEMFILE="$PLUGIN_BASEDIR/Gemfile" bundler exec "$PLUGIN_BASEDIR/bin/run"
else
Expand All @@ -35,4 +36,4 @@ function run_plugin() {
-e HTTP_PROXY -e HTTPS_PROXY \
"$IMAGE"
fi
}
}
1 change: 1 addition & 0 deletions lib/test_summary_buildkite_plugin/input.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# frozen_string_literal: true
require 'tmpdir'
require 'json'
require 'ostruct'

# We don't use nokogiri because we use an alpine-based docker image
# And adding the required dependencies triples the size of the image
Expand Down

0 comments on commit a8aa7be

Please sign in to comment.