diff --git a/.travis/before_install.sh b/.travis/before_install.sh index 0f34538540..b1234a3909 100644 --- a/.travis/before_install.sh +++ b/.travis/before_install.sh @@ -32,6 +32,7 @@ function install_jdk() { } if travis_isLinux; then + change_ruby_version gem install bundler bundle config set --local path vendor/bundle bundle config set --local with release_notes_preprocessing diff --git a/.travis/common-functions.sh b/.travis/common-functions.sh index 3148dd9796..c217bb3c6f 100755 --- a/.travis/common-functions.sh +++ b/.travis/common-functions.sh @@ -57,3 +57,8 @@ function travis_isWindows() { function get_pom_version() { echo $(./mvnw -q -Dexec.executable="echo" -Dexec.args='${project.version}' --non-recursive org.codehaus.mojo:exec-maven-plugin:3.0.0:exec) } + +function change_ruby_version() { + source "$HOME/.rvm/scripts/rvm" + rvm use ruby-2.7 +} diff --git a/.travis/regression-tester.sh b/.travis/regression-tester.sh index 5f44b7433b..6d48090dbd 100644 --- a/.travis/regression-tester.sh +++ b/.travis/regression-tester.sh @@ -1,6 +1,7 @@ # # The functions here require the following scripts: # .travis/logger.sh +# .travis/common-functions.sh # # The functions here require the following environment variables: # PMD_SF_USER @@ -12,6 +13,7 @@ # In that case, just a error logging is provided. # function regression-tester_uploadBaseline() { + change_ruby_version log_debug "$FUNCNAME branch=${TRAVIS_BRANCH}" local targetUrl="https://sourceforge.net/projects/pmd/files/pmd-regression-tester/" @@ -49,6 +51,7 @@ function regression-tester_uploadBaseline() { # In that case, just a error logging is provided. # function regression-tester_executeDanger() { + change_ruby_version log_debug "$FUNCNAME" local errexitstate="$(shopt -po errexit)"