aboutsummaryrefslogtreecommitdiffstats
path: root/.travis.yml
diff options
context:
space:
mode:
authorLukasz Jarocki <lukasz.jarocki@sonarsource.com>2022-04-01 09:16:23 +0200
committersonartech <sonartech@sonarsource.com>2022-04-01 08:22:58 +0000
commitec2c374dafd43d8d8fb5f9528cdd347ff4ccdaf0 (patch)
treecaaf5e09593ad4bf9b2ed6e6d3e921e111c23300 /.travis.yml
parent965034a2fb6d40d52761187f0442d81dc047c3a1 (diff)
downloadsonarqube-ec2c374dafd43d8d8fb5f9528cdd347ff4ccdaf0.tar.gz
sonarqube-ec2c374dafd43d8d8fb5f9528cdd347ff4ccdaf0.zip
NO-JIRA fixed issue where sometimes Travis could not connect to Next
Diffstat (limited to '.travis.yml')
-rw-r--r--.travis.yml23
1 files changed, 18 insertions, 5 deletions
diff --git a/.travis.yml b/.travis.yml
index bc2be6a0ad5..e7e84a0a623 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,13 +1,8 @@
-language: java
sudo: required
install: true
-jdk: openjdk11
script: ./travis.sh
dist: bionic
-before_install:
- - nvm install 14
-
branches:
except:
- /^dogfood\/.*$/
@@ -28,6 +23,24 @@ before_cache:
- rm -fr $HOME/.gradle/caches/*/plugin-resolution/
- rm -fr $HOME/.gradle/caches/*/fileHashes/
- rm -fr $HOME/.gradle/caches/*/scripts/
+
+# We remove outdated OpenJDK 11.0.2 which is hardcoded here https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_jdk/files/install-jdk.sh#L200
+# And we install openjdk-11-jdk-headless Ubuntu package. This way we are not stuck at 11.0.2 version.
+# For more context please visit:
+# - https://travis-ci.community/t/old-java-version-in-bionic/4726
+# - https://travis-ci.community/t/use-latest-java-point-versions-from-ubuntu-packages-instead-of-hard-coding-old-fix-versions-from-java-net-in-install-jdk-sh/8518
+# - https://github.com/apache/fineract/pull/846/commits/3997f54cfd7e635938e21877c9b0ff757134a8ee
+before_install:
+ - echo $JAVA_HOME
+ - which java
+ - sudo rm -rf /usr/local/lib/jvm/
+ - sudo apt-get install -y openjdk-11-jdk-headless
+ - export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/
+ - which java
+ - java -version
+ - $JAVA_HOME/bin/java -version
+ - nvm install 14
+ - nvm use 14
notifications:
email: false