From 88355f5b02ba43f89c91b0c9e90c6acd8477d0a4 Mon Sep 17 00:00:00 2001 From: Kevin Green Date: Fri, 14 Oct 2022 12:30:26 -0400 Subject: [PATCH] Fix issue where bundler was installing plugin gems and project gems (#9) --- README.md | 2 +- bin/setup | 6 +----- hooks/post-artifact | 4 ++-- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index c2551f0..543b5cf 100644 --- a/README.md +++ b/README.md @@ -57,7 +57,7 @@ Add a build step using the test-summary plugin: ```yaml - label: annotate plugins: - - instacart/test-summary#v1.14.0: + - instacart/test-summary#v1.14.3: inputs: - label: rspec artifact_path: artifacts/rspec* diff --git a/bin/setup b/bin/setup index 304a1fe..98468d1 100755 --- a/bin/setup +++ b/bin/setup @@ -1,8 +1,4 @@ #!/usr/bin/env bash set -euo pipefail -PLUGIN_BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" - -bundle install --quiet --gemfile="${PLUGIN_BASEDIR}/Gemfile" - -# Do any other automated setup that you need to do here +bundle install --quiet diff --git a/hooks/post-artifact b/hooks/post-artifact index 6043b9e..4d9ce6b 100755 --- a/hooks/post-artifact +++ b/hooks/post-artifact @@ -18,8 +18,8 @@ trap on_failure ERR PLUGIN_BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && cd .. && pwd )" if [[ ${BUILDKITE_PLUGIN_TEST_SUMMARY_RUN_WITHOUT_DOCKER:-false} = true ]]; then - $PLUGIN_BASEDIR/bin/setup - $PLUGIN_BASEDIR/bin/run + BUNDLE_GEMFILE="$PLUGIN_BASEDIR/Gemfile" $PLUGIN_BASEDIR/bin/setup + BUNDLE_GEMFILE="$PLUGIN_BASEDIR/Gemfile" bundler exec $PLUGIN_BASEDIR/bin/run else TAG=$(git describe --tags --exact-match 2> /dev/null || true)