2018-11-13 12:38:37 -05: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.
|
|
|
|
|
2014-12-19 18:53:19 -05:00
|
|
|
language: java
|
|
|
|
|
2019-07-08 15:24:51 -04:00
|
|
|
sudo: true
|
|
|
|
dist: xenial
|
2017-07-19 02:19:33 -04:00
|
|
|
|
2014-12-19 18:53:19 -05:00
|
|
|
jdk:
|
2019-05-10 20:09:55 -04:00
|
|
|
- openjdk8
|
2015-01-07 18:07:14 -05:00
|
|
|
|
2015-08-07 21:05:25 -04:00
|
|
|
cache:
|
|
|
|
directories:
|
2017-05-20 14:42:44 -04:00
|
|
|
- $HOME/.m2
|
2018-07-31 15:56:57 -04:00
|
|
|
|
2019-08-07 12:52:42 -04:00
|
|
|
env:
|
|
|
|
global:
|
|
|
|
- DOCKER_IP=127.0.0.1 # for integration tests
|
|
|
|
- MVN="mvn -B"
|
|
|
|
- > # Various options to make execution of maven goals faster (e.g., mvn install)
|
|
|
|
MAVEN_SKIP="
|
|
|
|
-Danimal.sniffer.skip=true
|
|
|
|
-Dcheckstyle.skip=true
|
|
|
|
-Ddruid.console.skip=true
|
|
|
|
-Denforcer.skip=true
|
|
|
|
-Dforbiddenapis.skip=true
|
|
|
|
-Dmaven.javadoc.skip=true
|
|
|
|
-Dpmd.skip=true
|
|
|
|
-Dspotbugs.skip=true
|
|
|
|
"
|
|
|
|
|
|
|
|
# Add various options to make 'mvn install' fast and skip javascript compile (-Ddruid.console.skip=true) since it is not
|
2019-08-08 21:13:18 -04:00
|
|
|
# needed. Depending on network speeds, "mvn -q install" may take longer than the default 10 minute timeout to print any
|
|
|
|
# output. To compensate, use travis_wait to extend the timeout.
|
2019-08-12 16:25:08 -04:00
|
|
|
install: MAVEN_OPTS='-Xmx3000m' travis_wait 15 $MVN clean install -q -ff ${MAVEN_SKIP} -DskipTests -T1C
|
2019-08-07 12:52:42 -04:00
|
|
|
|
2017-05-31 21:27:34 -04:00
|
|
|
matrix:
|
|
|
|
include:
|
2019-08-07 12:52:42 -04:00
|
|
|
- name: "java 11 build"
|
|
|
|
jdk: openjdk11
|
|
|
|
script: $MVN test -pl '!web-console' ${MAVEN_SKIP}
|
|
|
|
|
|
|
|
- name: "animal sniffer checks"
|
|
|
|
script: $MVN animal-sniffer:check --fail-at-end
|
|
|
|
|
|
|
|
- name: "checkstyle"
|
|
|
|
script: $MVN checkstyle:checkstyle --fail-at-end
|
|
|
|
|
|
|
|
- name: "enforcer checks"
|
|
|
|
script: $MVN enforcer:enforce --fail-at-end
|
|
|
|
|
|
|
|
- name: "forbidden api checks"
|
|
|
|
script: $MVN forbiddenapis:check forbiddenapis:testCheck --fail-at-end
|
|
|
|
|
|
|
|
- name: "pmd checks"
|
|
|
|
script: $MVN pmd:check --fail-at-end # TODO: consider adding pmd:cpd-check
|
|
|
|
|
|
|
|
- name: "spotbugs checks"
|
|
|
|
script: $MVN spotbugs:check --fail-at-end -pl '!benchmarks'
|
|
|
|
|
|
|
|
- name: "license checks"
|
|
|
|
install: skip
|
2019-08-12 16:25:08 -04:00
|
|
|
before_script: &setup_generate_license
|
|
|
|
- sudo apt-get update && sudo apt-get install python3 python3-pip python3-setuptools -y
|
|
|
|
- pip3 install wheel # install wheel first explicitly
|
|
|
|
- pip3 install pyyaml
|
|
|
|
script:
|
|
|
|
- >
|
|
|
|
$MVN apache-rat:check -Prat --fail-at-end
|
|
|
|
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
|
|
|
|
-Drat.consoleOutput=true
|
|
|
|
# Generate dependency reports and checks they are valid. When running on Travis CI, 2 cores are available
|
|
|
|
# (https://docs.travis-ci.com/user/reference/overview/#virtualisation-environment-vs-operating-system).
|
|
|
|
- mkdir -p target
|
|
|
|
- docs/_bin/generate-license-dependency-reports.py . target --clean-maven-artifact-transfer --parallel 2
|
|
|
|
- docs/_bin/generate-license.py licenses/APACHE2 licenses.yaml LICENSES.BINARY --dependency-reports target/license-reports
|
2019-08-07 12:52:42 -04:00
|
|
|
|
|
|
|
- name: "strict compilation"
|
|
|
|
install: skip
|
2017-06-26 21:51:48 -04:00
|
|
|
# Strict compilation requires more than 2 GB
|
2019-08-07 12:52:42 -04:00
|
|
|
script: >
|
|
|
|
MAVEN_OPTS='-Xmx3000m' $MVN clean -Pstrict compile test-compile --fail-at-end
|
|
|
|
-pl '!benchmarks' ${MAVEN_SKIP} -DskipTests
|
2017-06-26 21:51:48 -04:00
|
|
|
|
2019-08-07 12:52:42 -04:00
|
|
|
- name: "packaging check"
|
2019-08-12 16:25:08 -04:00
|
|
|
install: skip
|
|
|
|
before_script: *setup_generate_license
|
|
|
|
script: >
|
|
|
|
MAVEN_OPTS='-Xmx3000m' $MVN clean install -Pdist -Pbundle-contrib-exts --fail-at-end
|
|
|
|
-pl '!benchmarks' ${MAVEN_SKIP} -DskipTests -Ddruid.console.skip=false -T1C
|
2019-04-07 23:12:23 -04:00
|
|
|
|
2019-08-07 12:52:42 -04:00
|
|
|
- name: "processing module test"
|
|
|
|
env: &processing_env
|
|
|
|
- MAVEN_PROJECTS='processing'
|
|
|
|
before_script: &setup_java_test
|
|
|
|
- unset _JAVA_OPTIONS
|
|
|
|
script: &run_java_test
|
|
|
|
# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid intermittent connection timeouts when
|
|
|
|
# resolving the SIGAR dependency.
|
|
|
|
- >
|
|
|
|
MAVEN_OPTS='-Xmx800m' $MVN test -pl ${MAVEN_PROJECTS}
|
|
|
|
${MAVEN_SKIP} -Dremoteresources.skip=true
|
2018-08-11 01:03:36 -04:00
|
|
|
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0"
|
|
|
|
- free -m
|
2017-06-26 21:51:48 -04:00
|
|
|
|
2019-08-07 12:52:42 -04:00
|
|
|
- name: "processing module test (SQL Compatibility)"
|
|
|
|
env: *processing_env
|
|
|
|
before_script: *setup_java_test
|
|
|
|
script: &run_java_sql_compat_test
|
|
|
|
# Set MAVEN_OPTS for Surefire launcher. Skip remoteresources to avoid intermittent connection timeouts when
|
|
|
|
# resolving the SIGAR dependency.
|
|
|
|
- >
|
|
|
|
MAVEN_OPTS='-Xmx800m' $MVN test -pl ${MAVEN_PROJECTS} -Ddruid.generic.useDefaultValueForNull=false
|
|
|
|
${MAVEN_SKIP} -Dremoteresources.skip=true
|
2018-08-11 01:03:36 -04:00
|
|
|
- sh -c "dmesg | egrep -i '(oom|out of memory|kill process|killed).*' -C 1 || exit 0"
|
|
|
|
- free -m
|
2018-08-02 11:20:25 -04:00
|
|
|
|
2019-08-07 12:52:42 -04:00
|
|
|
- name: "indexing modules test"
|
|
|
|
env: &indexing_env
|
|
|
|
- MAVEN_PROJECTS='indexing-hadoop,indexing-service,extensions-core/kafka-indexing-service,extensions-core/kinesis-indexing-service'
|
|
|
|
before_script: *setup_java_test
|
|
|
|
script: *run_java_test
|
|
|
|
|
|
|
|
- name: "indexing modules test (SQL Compatibility)"
|
|
|
|
env: *indexing_env
|
|
|
|
before_script: *setup_java_test
|
|
|
|
script: *run_java_sql_compat_test
|
|
|
|
|
|
|
|
- name: "server module test"
|
|
|
|
env: &server_env
|
|
|
|
- MAVEN_PROJECTS='server'
|
|
|
|
before_script: *setup_java_test
|
|
|
|
script: *run_java_test
|
|
|
|
|
|
|
|
- name: "server module test (SQL Compatibility)"
|
|
|
|
env: *server_env
|
|
|
|
before_script: *setup_java_test
|
|
|
|
script: *run_java_sql_compat_test
|
|
|
|
|
|
|
|
- name: "other modules test"
|
|
|
|
env: &other_env
|
|
|
|
- MAVEN_PROJECTS='!processing,!indexing-hadoop,!indexing-service,!extensions-core/kafka-indexing-service,!extensions-core/kinesis-indexing-service,!server,!web-console'
|
|
|
|
before_script: *setup_java_test
|
|
|
|
script: *run_java_test
|
|
|
|
|
|
|
|
- name: "other modules test (SQL Compatibility)"
|
|
|
|
env: *other_env
|
|
|
|
before_script: *setup_java_test
|
|
|
|
script: *run_java_sql_compat_test
|
|
|
|
|
|
|
|
- name: "web console"
|
2018-08-11 01:03:36 -04:00
|
|
|
script:
|
2019-08-07 12:52:42 -04:00
|
|
|
- $MVN test -pl 'web-console'
|
2018-08-02 11:20:25 -04:00
|
|
|
|
2019-08-07 12:52:42 -04:00
|
|
|
- name: "batch index integration test"
|
|
|
|
services: &integration_test_services
|
2017-05-31 21:27:34 -04:00
|
|
|
- docker
|
2019-08-07 12:52:42 -04:00
|
|
|
env: TESTNG_GROUPS='-Dgroups=batch-index'
|
|
|
|
script: &run_integration_test
|
|
|
|
- $MVN verify -pl integration-tests -P integration-tests ${TESTNG_GROUPS} ${MAVEN_SKIP}
|
|
|
|
after_failure: &integration_test_diags
|
2017-11-10 17:07:37 -05:00
|
|
|
- for v in ~/shared/logs/*.log ; do
|
|
|
|
echo $v logtail ======================== ; tail -100 $v ;
|
|
|
|
done
|
|
|
|
- for v in broker middlemanager overlord router coordinator historical ; do
|
|
|
|
echo $v dmesg ======================== ;
|
|
|
|
docker exec -it druid-$v sh -c 'dmesg | tail -3' ;
|
|
|
|
done
|
2018-09-19 12:56:15 -04:00
|
|
|
|
2019-08-07 12:52:42 -04:00
|
|
|
- name: "kafka index integration test"
|
|
|
|
services: *integration_test_services
|
|
|
|
env: TESTNG_GROUPS='-Dgroups=kafka-index'
|
|
|
|
script: *run_integration_test
|
|
|
|
after_failure: *integration_test_diags
|
|
|
|
|
|
|
|
- name: "query integration test"
|
|
|
|
services: *integration_test_services
|
|
|
|
env: TESTNG_GROUPS='-Dgroups=query'
|
|
|
|
script: *run_integration_test
|
|
|
|
after_failure: *integration_test_diags
|
|
|
|
|
|
|
|
- name: "realtime index integration test"
|
|
|
|
services: *integration_test_services
|
|
|
|
env: TESTNG_GROUPS='-Dgroups=realtime-index'
|
|
|
|
script: *run_integration_test
|
|
|
|
after_failure: *integration_test_diags
|
|
|
|
|
|
|
|
- name: "other integration test"
|
|
|
|
services: *integration_test_services
|
|
|
|
env: TESTNG_GROUPS='-DexcludedGroups=batch-index,kafka-index,query,realtime-index'
|
|
|
|
script: *run_integration_test
|
|
|
|
after_failure: *integration_test_diags
|