2016-09-03 07:37:59 -04:00
# 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.
2015-11-12 12:12:32 -05:00
language : java
2019-08-04 18:20:15 -04:00
matrix :
include :
- stage : "Cache"
name : "Cache Dependencies - no explicit jdk specified"
script : >-
if [ ! -d "$HOME"/.m2/repository ] || [ ! "$(ls -A "$HOME"/.m2/repository)" ] ; then
echo "Cached Maven repository does not exist, downloading dependencies..."
2019-09-30 10:51:58 -04:00
mvn -V -T 1C -pl !./nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-nar,!./nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors dependency:go-offline -Dsilent -ntp --fail-never \
2019-08-04 18:20:15 -04:00
| grep -v -F -f .travis-output-filters -e "Failed to execute goal on project"
else
echo "Cached Maven repository exists, skipping dependency cache"
fi
- stage : "Cache"
name : "Cache Dependencies - openjdk8"
jdk : openjdk8
script : >-
if [ ! -d "$HOME"/.m2/repository ] || [ ! "$(ls -A "$HOME"/.m2/repository)" ] ; then
echo "Cached Maven repository does not exist, downloading dependencies..."
2019-09-30 10:51:58 -04:00
mvn -V -T 1C -pl !./nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-nar,!./nifi-nar-bundles/nifi-hive-bundle/nifi-hive3-processors dependency:go-offline -Dsilent -ntp --fail-never \
2019-08-04 18:20:15 -04:00
| grep -v -F -f .travis-output-filters -e "Failed to execute goal on project"
else
echo "Cached Maven repository exists, skipping dependency cache"
fi
# For the build stages, use -pl to exclude the following from the build to reduce build time:
# non-api nar modules
# assembly modules
# nifi-maven-archetype directories that have "__" in the name
- stage : "Build"
name : "Build Java 8 EN"
jdk : openjdk8
script : >-
mvn clean install -V -T 1C
2019-09-30 10:51:58 -04:00
-pl `find . -type d \( -name "*-nar" -or -name "*-assembly" -or -name "*hive3*" \) -and -not -name "*api-nar" -and -not -path "*/target/*" -and -not -name "*__*" -printf "!./%P,"`
2019-08-04 18:20:15 -04:00
-Pcontrib-check,include-grpc -Ddir-only
-Dmaven.surefire.arguments="-Duser.language=en -Duser.region=US"
| grep -v -F -f .travis-output-filters
&& test ${PIPESTATUS[0]} -eq 0
- stage : "Build"
name : "Build Java 8 FR"
jdk : openjdk8
script : >-
mvn clean install -V -T 1C
2019-09-30 10:51:58 -04:00
-pl `find . -type d \( -name "*-nar" -or -name "*-assembly" -or -name "*hive3*" \) -and -not -name "*api-nar" -and -not -path "*/target/*" -and -not -name "*__*" -printf "!./%P,"`
2019-08-04 18:20:15 -04:00
-Pcontrib-check,include-grpc -Ddir-only
-Dmaven.surefire.arguments="-Duser.language=fr -Duser.region=FR"
| grep -v -F -f .travis-output-filters
&& test ${PIPESTATUS[0]} -eq 0
- stage : "Build"
name : "Build Java 8 JA"
jdk : openjdk8
script : >-
mvn clean install -V -T 1C
2019-09-30 23:52:13 -04:00
-pl `find . -type d \( -name "*-nar" -or -name "*-assembly" -or -name "*hive3*" \) -and -not -name "*api-nar" -and -not -path "*/target/*" -and -not -name "*__*" -printf "!./%P,"`
2019-08-04 18:20:15 -04:00
-Pcontrib-check,include-grpc -Ddir-only
-Dmaven.surefire.arguments="-Duser.language=ja -Duser.region=JP"
| grep -v -F -f .travis-output-filters
&& test ${PIPESTATUS[0]} -eq 0
- stage : "Build"
name : "Build Java 11 EN"
# Do not specify "jdk:" here, install-jdk.sh will download the JDK set JAVA_HOME appropriately
before_script :
# Download the newest version of sormuras' install-jdk.sh to /tmp
# install-jdk.sh is used by Travis internally, sormoras is the maintainer of that script
- wget -O /tmp/install-jdk.sh https://github.com/sormuras/bach/raw/master/install-jdk.sh
# Need to specifically install AdoptOpenJDK 11.0.4 (Linux, HotSpot) since Travis does not offer it by default
# The link to the AdoptOpenJDK 11.0.4 .tar.gz is taken directly from AdoptOpenJDK's website
- >-
source /tmp/install-jdk.sh
--url 'https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.4%2B11/OpenJDK11U-jdk_x64_linux_hotspot_11.0.4_11.tar.gz'
script :
- >-
mvn clean install -V -T 1C
2019-09-30 10:51:58 -04:00
-pl `find . -type d \( -name "*-nar" -or -name "*-assembly" -or -name "*hive3*" \) -and -not -name "*api-nar" -and -not -path "*/target/*" -and -not -name "*__*" -printf "!./%P,"`
2019-08-04 18:20:15 -04:00
-Pcontrib-check,include-grpc -Ddir-only
-Dmaven.surefire.arguments="-Duser.language=en -Duser.region=US"
| grep -v -F -f .travis-output-filters
&& test ${PIPESTATUS[0]} -eq 0
2017-02-07 09:00:44 -05:00
2015-11-12 12:12:32 -05:00
os :
- linux
2019-08-04 18:20:15 -04:00
# Caches mvn repository in order to speed up builds
2016-09-03 07:37:59 -04:00
cache :
directories :
2017-03-26 08:06:41 -04:00
- $HOME/.m2
- $HOME/.npm
2017-12-06 12:03:16 -05:00
2017-03-26 08:06:41 -04:00
before_cache :
# Remove nifi repo again to save travis from caching it
- rm -rf $HOME/.m2/repository/org/apache/nifi/
2016-09-03 07:37:59 -04:00
2016-01-04 15:06:19 -05:00
# before_install aids in a couple workarounds for issues within the Travis-CI environment
# 1. Workaround for buffer overflow issues with OpenJDK versions of java as per https://github.com/travis-ci/travis-ci/issues/5227#issuecomment-165135711
# 2. Workaround for non-existent Maven repository as per: https://github.com/travis-ci/travis-ci/issues/4629#issuecomment-131214465
2015-11-12 12:12:32 -05:00
before_install :
2016-01-04 15:06:19 -05:00
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
2015-11-12 12:12:32 -05:00
- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
2016-09-03 07:37:59 -04:00
- echo "MAVEN_OPTS='-Xmx2g -XX:+UseG1GC'" > ~/.mavenrc
2017-02-07 09:00:44 -05:00
- cat ~/.mavenrc
2017-03-26 08:06:41 -04:00
# Remove nifi repo again to save travis from caching it
- rm -rf $HOME/.m2/repository/org/apache/nifi/
2019-08-04 18:20:15 -04:00
# Install Maven 3.6.1
- wget -O /tmp/apache-maven-3.6.1-bin.tar.gz https://archive.apache.org/dist/maven/maven-3/3.6.1/binaries/apache-maven-3.6.1-bin.tar.gz
- tar xzf /tmp/apache-maven-3.6.1-bin.tar.gz -C /tmp
- export M2_HOME=/tmp/apache-maven-3.6.1
- export PATH=$M2_HOME/bin:$PATH
2016-09-03 07:37:59 -04:00
2017-12-06 12:03:16 -05:00
install : true