| # Licensed to the Apache Software Foundation (ASF) under one |
| # or more contributor license agreements. See the NOTICE file |
| # distributed with this work for additional information |
| # regarding copyright ownership. The ASF licenses this file |
| # to you under the Apache License, Version 2.0 (the |
| # "License"); you may not use this file except in compliance |
| # with the License. You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, |
| # software distributed under the License is distributed on an |
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| # KIND, either express or implied. See the License for the |
| # specific language governing permissions and limitations |
| # under the License. |
| # |
| |
| # https://docs.travis-ci.com/user/reference/linux/ |
| # Must use a fixed distribution (and remember to occassionally upgrade..) |
| # to avoid surprise changes such as https://issues.apache.org/jira/browse/FINERACT-763 |
| dist: bionic |
| |
| language: generic |
| |
| addons: |
| sonarcloud: |
| organization: "apache" |
| token: |
| secure: "Q2E9ijK+9+R6nkb9o2FQrKUiAozp0325mlGfM25rGV3mCRPyWR/lU8o48r2eaBEX8SEvMvXIO3XXD9SPyUX2+svLz0MOMdfZfNveg6jmcHNRjkzzBK0bMIIGbEH/YqJ+psl4nDmlDd6IK4685/1JSRUJLqeKKK2ulixm6PXcmwZWeKD6TjyXsW50zz3yYIOuROHzys/M6H05h1dZD3j6ztnRsjbr7SmqFEVWSRgEd/aAs+HZB9Fv1xN66csRoQUQKgzoBO9egAQcel65Av0Bf+pOQuzVDVyXNohZEYia02MCGlC6OFvtL7xIXGf/vo02RdnlN4Jnma6P37TaNrmpk2e+EGJaZHmL9cb98+Zc39uPb7qEZkMfDdKrW6QVRtScSuCJzpY58WRgTS0jLCxsDBAMfsrIvWbHntFZL9q5aEkFgecj0pg9u6WHxgA8cuPUY5QzHQo9fEUxNJHGJHQ2FkafLniqJp7DVbsyQHmEggaTrGGrketeYvCbSR1oOnBgImUwzjIV9/zOdd10Wzi8x9HsmzrGBPSBaO4fBxjC1LZwdyue2a2+oKvBqpAGcLpGaCRfHTh2yPXhZW4bw11rOmQxgtOQVBXhveciWAUQuVXIak+RZnu/zRvnul9sZ6bb1hEUPkpUypk+FDeLm8T7y2A++u/jBam2vLc0iff5xtA=" |
| |
| # See https://issues.apache.org/jira/browse/FINERACT-937 for background re. what below is all about.. |
| # We basically remove the outdated OpenJDK 11.0.2 which Travis image grabbed from java.net in |
| # https://github.com/travis-ci/travis-cookbooks/blob/master/cookbooks/travis_jdk/files/install-jdk.sh#L200 |
| # (which has 11.0.2 hard-coded!), and instead replace it with the latest Azul Zulu Debian package. |
| # NB /usr/local/lib/jvm/openjdk11/bin is also on the PATH, but there's no need to change it (because we rm -rf anyway) |
| # Installing Azul Zulu as per official instructions https://docs.azul.com/core/zulu-openjdk/install/debian |
| before_install: |
| - echo $JAVA_HOME |
| - which java |
| - sudo rm -rf /usr/local/lib/jvm/ |
| |
| install: |
| - unset _JAVA_OPTIONS |
| - sudo apt-get -q update |
| - sudo apt-get -yq install gnupg curl dirmngr |
| - sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9 |
| - curl -O https://cdn.azul.com/zulu/bin/zulu-repo_1.0.0-3_all.deb |
| - sudo apt-get -yq install ./zulu-repo_1.0.0-3_all.deb |
| - sudo apt-get -q update |
| - sudo apt-get -yq install zulu17-jdk |
| - export JAVA_HOME=/usr/lib/jvm/zulu17 |
| |
| # https://docs.travis-ci.com/user/languages/java/#caching |
| before_cache: |
| - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock |
| - rm -fr $HOME/.gradle/caches/*/plugin-resolution/ |
| cache: |
| directories: |
| - $HOME/.gradle/caches/ |
| - $HOME/.gradle/wrapper/ |
| - $HOME/.m2 |
| |
| # Check Java environment variables |
| before_script: |
| - echo $JDK_JAVA_OPTIONS |
| - echo $JAVA_OPTIONS |
| - echo $JAVA_HOME |
| - which java |
| - java -version |
| - which javac |
| - javac -version |
| - $JAVA_HOME/bin/java -version |
| |
| script: |
| - date |
| # Using travis_wait for a proccess that could take longer than 20 minutes, in this case the SonaQube analysis |
| # https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received |
| - travis_wait 30 ./gradlew -q --no-daemon --console=plain -x rat -x test sonarqube -Pcoverage=true |
| - date |