Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use bundler 2.4.22 in ruby 2.7 environments #394

Merged
merged 1 commit into from
Jan 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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']
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Annoyingly, with the quoted string in bash, we needed to manually do the double bracketing instead of jenkins job builder doing it for us in the .yaml configs. This was the cause of previous job failures.

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