nifi/.travis.yml
Mark Payne 5f4ce8f431
NIFI-6707: Addition of nifi-system-tests module. Updates to EmbeddedNiFi, NiFi and SystemBundle to properly support classloader isolation that is needed for creating system-level tests and isolating the classpath of the tests themselves from the NiFi classpath. Fixed bootstrap listener to ensure that it always closes socket before calling shutdown(). Failure to do so can result in RunNiFi sometimes timing out while waiting for a response from NiFi
NIFI-6707: Added System Test to verify behavior when services depend on one another

NIFI-6707: Ensure that when tearing down flow after test, we wait for all processors and controller services to complete stop/disable before attempting to delete them

NIFI-6707: Fixed bug in RemoteProcessGroupIT that caused the test to fail intermittently based on timing. Improved logging for Process Group, Standard Process Group

NIFI-6707: Updated to include java11 subdirectory under lib/

NIFI-6707: Rebased against master and changed dependencies from 1.10.0-SNAPSHOT to 1.11.0-SNAPSHOT

NIFI-6707: Updates to see if it will help travis build correctly

NIFI-6707: Commenting out java commands in bootstrap.conf files

This closes #3831.

Signed-off-by: Bryan Bende <bbende@apache.org>
2019-11-08 12:33:16 -05:00

127 lines
6.6 KiB
YAML

# 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.
language: java
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..."
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 \
| 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..."
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 \
| 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
-pl `find . -type d \( -name "*-nar" -or -name "*-assembly" -or -name "*hive3*" -or -name "nifi-system-test*" \) -and -not -name "*api-nar" -and -not -path "*/target/*" -and -not -name "*__*" -printf "!./%P,"`
-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
-pl `find . -type d \( -name "*-nar" -or -name "*-assembly" -or -name "*hive3*" -or -name "nifi-system-test*" \) -and -not -name "*api-nar" -and -not -path "*/target/*" -and -not -name "*__*" -printf "!./%P,"`
-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
-pl `find . -type d \( -name "*-nar" -or -name "*-assembly" -or -name "*hive3*" -or -name "nifi-system-test*" \) -and -not -name "*api-nar" -and -not -path "*/target/*" -and -not -name "*__*" -printf "!./%P,"`
-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
-pl `find . -type d \( -name "*-nar" -or -name "*-assembly" -or -name "*hive3*" -or -name "nifi-system-test*" \) -and -not -name "*api-nar" -and -not -path "*/target/*" -and -not -name "*__*" -printf "!./%P,"`
-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
os:
- linux
# Caches mvn repository in order to speed up builds
cache:
directories:
- $HOME/.m2
- $HOME/.npm
before_cache:
# Remove nifi repo again to save travis from caching it
- rm -rf $HOME/.m2/repository/org/apache/nifi/
# 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
before_install:
- sudo hostname "$(hostname | cut -c1-63)"
- sed -e "s/^\\(127\\.0\\.0\\.1.*\\)/\\1 $(hostname | cut -c1-63)/" /etc/hosts | sudo tee /etc/hosts
- sed -i.bak -e 's|https://nexus.codehaus.org/snapshots/|https://oss.sonatype.org/content/repositories/codehaus-snapshots/|g' ~/.m2/settings.xml
- echo "MAVEN_OPTS='-Xmx2g -XX:+UseG1GC'" > ~/.mavenrc
- cat ~/.mavenrc
# Remove nifi repo again to save travis from caching it
- rm -rf $HOME/.m2/repository/org/apache/nifi/
# 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
install: true