You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2018/02/03 00:32:23 UTC
[bookkeeper] branch master updated: BP-26 (task 4): run dlog tests
when pull requests modify dlog modules
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new bb3ae06 BP-26 (task 4): run dlog tests when pull requests modify dlog modules
bb3ae06 is described below
commit bb3ae067a34e017098bf43011982a335b2768b90
Author: Sijie Guo <si...@apache.org>
AuthorDate: Fri Feb 2 16:32:16 2018 -0800
BP-26 (task 4): run dlog tests when pull requests modify dlog modules
Descriptions of the changes in this PR:
- enable dlog tests on all post commit CI jobs
- for pull requests, only run dlog tests on travis CI and only when the pull requests modify dlog modules.
Master Issue: #1024
Author: Sijie Guo <si...@apache.org>
Reviewers: Yiming Zang <yz...@gmail.com>, Jia Zhai <None>
This closes #1096 from sijie/enable_dlog_ci
---
.../job_bookkeeper_postcommit_master_java8.groovy | 2 +-
.../job_bookkeeper_postcommit_master_java9.groovy | 2 +-
.../job_bookkeeper_release_nightly_snapshot.groovy | 2 +-
.travis.yml | 23 ++++++++++++++++++----
stream/distributedlog/pom.xml | 1 +
5 files changed, 23 insertions(+), 7 deletions(-)
diff --git a/.test-infra/jenkins/job_bookkeeper_postcommit_master_java8.groovy b/.test-infra/jenkins/job_bookkeeper_postcommit_master_java8.groovy
index 941bbfe..d4928bb 100644
--- a/.test-infra/jenkins/job_bookkeeper_postcommit_master_java8.groovy
+++ b/.test-infra/jenkins/job_bookkeeper_postcommit_master_java8.groovy
@@ -42,5 +42,5 @@ mavenJob('bookkeeper_postcommit_master_java8') {
common_job_properties.setMavenConfig(delegate)
// Maven build project.
- goals('clean apache-rat:check package spotbugs:check')
+ goals('clean apache-rat:check package spotbugs:check -Ddistributedlog')
}
diff --git a/.test-infra/jenkins/job_bookkeeper_postcommit_master_java9.groovy b/.test-infra/jenkins/job_bookkeeper_postcommit_master_java9.groovy
index 20e3e55..6134413 100644
--- a/.test-infra/jenkins/job_bookkeeper_postcommit_master_java9.groovy
+++ b/.test-infra/jenkins/job_bookkeeper_postcommit_master_java9.groovy
@@ -42,5 +42,5 @@ mavenJob('bookkeeper_postcommit_master_java9') {
common_job_properties.setMavenConfig(delegate)
// Maven build project.
- goals('clean apache-rat:check package spotbugs:check')
+ goals('clean apache-rat:check package spotbugs:check -Ddistributedlog')
}
diff --git a/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy b/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy
index b6fb3bd..545e9c6 100644
--- a/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy
+++ b/.test-infra/jenkins/job_bookkeeper_release_nightly_snapshot.groovy
@@ -41,5 +41,5 @@ mavenJob('bookkeeper_release_nightly_snapshot') {
common_job_properties.setMavenConfig(delegate)
// Maven build project.
- goals('clean apache-rat:check package spotbugs:check -Dmaven.test.failure.ignore=true deploy')
+ goals('clean apache-rat:check package spotbugs:check -Dmaven.test.failure.ignore=true deploy -Ddistributedlog')
}
diff --git a/.travis.yml b/.travis.yml
index 96bc636..f3dd4fa 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -36,14 +36,29 @@ matrix:
env: CUSTOM_JDK="openjdk8"
before_install:
- - echo "MAVEN_OPTS='-Xmx3072m -XX:MaxPermSize=512m'" > ~/.mavenrc
- - if [ "$TRAVIS_OS_NAME" == "osx" ]; then export JAVA_HOME=$(/usr/libexec/java_home); fi
- - if [ "$TRAVIS_OS_NAME" == "linux" ]; then jdk_switcher use "$CUSTOM_JDK"; fi
+- |
+ echo "MAVEN_OPTS='-Xmx3072m -XX:MaxPermSize=512m'" > ~/.mavenrc
+ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ export JAVA_HOME=$(/usr/libexec/java_home);
+ fi
+ if [ "$TRAVIS_OS_NAME" == "linux" ]; then
+ jdk_switcher use "$CUSTOM_JDK";
+ fi
+ if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
+ export DLOG_MODIFIED="true"
+ echo "Enable testing distributedlog modules since they are not pull requests."
+ else
+ if [ `git diff --name-only $TRAVIS_COMMIT_RANGE | grep "^stream\/distributedlog" | wc -l` -gt 0 ]; then
+ export DLOG_MODIFIED="true"
+ echo "Enable testing distributedlog modules if this pull request modifies files under directory `stream/distributedlog`."
+ fi
+ fi
script:
- - travis_retry mvn --batch-mode clean apache-rat:check compile spotbugs:check package -DskipTests
+ - travis_retry mvn --batch-mode clean apache-rat:check compile spotbugs:check install -DskipTests
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then dev/check-binary-license ./bookkeeper-dist/all/target/bookkeeper-all-4.7.0-SNAPSHOT-bin.tar.gz; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then dev/check-binary-license ./bookkeeper-dist/server/target/bookkeeper-server-4.7.0-SNAPSHOT-bin.tar.gz; fi
+ - if [ "$DLOG_MODIFIED" == "true" ]; then cd stream/distributedlog && mvn --batch-mode clean package -Ddistributedlog; fi
# Disabled the tests here. Since tests are running much slower on Travis than on Jenkins
# - ./dev/ticktoc.sh "mvn --batch-mode clean package"
diff --git a/stream/distributedlog/pom.xml b/stream/distributedlog/pom.xml
index 545ebaa..854a339 100644
--- a/stream/distributedlog/pom.xml
+++ b/stream/distributedlog/pom.xml
@@ -239,4 +239,5 @@
</build>
</profile>
</profiles>
+
</project>
--
To stop receiving notification emails like this one, please contact
sijie@apache.org.