Skip to content

Commit

Permalink
Use bundler 2.4.22 in ruby 2.7 environments
Browse files Browse the repository at this point in the history
This extends the solution for commit
1d4dd26 to the shell script based jobs
  • Loading branch information
pcreech committed Jan 3, 2024
1 parent 256779c commit 930ab33
Show file tree
Hide file tree
Showing 8 changed files with 52 additions and 8 deletions.
8 changes: 7 additions & 1 deletion theforeman.org/scripts/test/test_develop.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,13 @@ rvm use ruby-${ruby}@${gemset} --create
rvm gemset empty --force
set -x

gem install bundler --no-document
if ["${ruby}" = '2.7']
then
gem install bundler -v 2.4.22 --no-document
else
gem install bundler --no-document
fi


# Retry as rubygems (being external to us) can be intermittent
bundle install --without=development --jobs=5 --retry=5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,13 @@
gemset=$(echo ${JOB_NAME} | cut -d/ -f1)-${EXECUTOR_NUMBER}
rvm use ruby-${ruby}@${gemset} --create
rvm gemset empty --force
gem install bundler --no-document

if ["${ruby}" = '2.7']
then
gem install bundler -v 2.4.22 --no-document
else
gem install bundler --no-document
fi

# Link hammer_cli from github
echo 'gem "hammer_cli", :github => "theforeman/hammer-cli"' > Gemfile.local
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ rvm use ruby-${ruby}@${gemset} --create
rvm gemset empty --force
set -x

gem install bundler --no-document
if ["${ruby}" = '2.7']
then
gem install bundler -v 2.4.22 --no-document
else
gem install bundler --no-document
fi

# Link hammer_cli from github
if [ "$ghprbTargetBranch" = "master" ]; then
Expand Down
7 changes: 6 additions & 1 deletion theforeman.org/scripts/test/test_hammer_cli_pull_request.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ rvm use ruby-${ruby}@${gemset} --create
rvm gemset empty --force
set -x

gem install bundler --no-document
if ["${ruby}" = '2.7']
then
gem install bundler -v 2.4.22 --no-document
else
gem install bundler --no-document
fi

bundle install --without development --jobs=5 --retry=5
bundle exec rake ci:setup:minitest test TESTOPTS="-v"
7 changes: 6 additions & 1 deletion theforeman.org/scripts/test/test_katello.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,12 @@ rvm use ruby-${ruby}@${gemset} --create
rvm gemset empty --force
set -x

gem install bundler --no-document
if ["${ruby}" = '2.7']
then
gem install bundler -v 2.4.22 --no-document
else
gem install bundler --no-document
fi

# Now let's introduce the plugin
echo "gemspec :path => '${PLUGIN_ROOT}', :development_group => :katello_dev" >> bundler.d/Gemfile.local.rb
Expand Down
8 changes: 7 additions & 1 deletion theforeman.org/scripts/test/test_plugin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,13 @@ rvm use ruby-${ruby}@${gemset} --create
rvm gemset empty --force

set -x
gem install bundler --no-document

if ["${ruby}" = '2.7']
then
gem install bundler -v 2.4.22 --no-document
else
gem install bundler --no-document
fi

# Retry as rubygems (being external to us) can be intermittent
bundle install --without=development --jobs=5 --retry=5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,13 @@
gemset=$(echo ${{JOB_NAME}} | cut -d/ -f1)-${{EXECUTOR_NUMBER}}
rvm use ruby-${{ruby}}@${{gemset}} --create
rvm gemset empty --force
gem install bundler --no-document
if ["${ruby}" = '2.7']
then
gem install bundler -v 2.4.22 --no-document
else
gem install bundler --no-document
fi
bundle install --without development --jobs=5 --retry=5
Expand Down
7 changes: 6 additions & 1 deletion theforeman.org/yaml/builders/smart-proxy-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
rvm gemset empty --force
set -x
gem install bundler --no-document
if ["${ruby}" = '2.7']
then
gem install bundler -v 2.4.22 --no-document
else
gem install bundler --no-document
fi
bundle install --retry 5 --jobs 5
bundle exec rake TESTOPTS="--verbose"
Expand Down

0 comments on commit 930ab33

Please sign in to comment.