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/03/01 17:52:46 UTC
[bookkeeper] branch master updated: Enable buiding website on
travis job if a PR is modifying `site`
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 d79c7a7 Enable buiding website on travis job if a PR is modifying `site`
d79c7a7 is described below
commit d79c7a77883de1e8bda668f6d16d1e80c3eed33d
Author: Sijie Guo <si...@apache.org>
AuthorDate: Thu Mar 1 09:52:39 2018 -0800
Enable buiding website on travis job if a PR is modifying `site`
Author: Sijie Guo <si...@apache.org>
Reviewers: Enrico Olivelli <eo...@gmail.com>, Jia Zhai <None>
This closes #1223 from sijie/run_tests_on_website_changes
---
.travis.yml | 32 ++++++++++++++++++++++++++++----
site/_config.yml | 1 +
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index 039999e..156a0ba 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -21,6 +21,9 @@ branches:
- asf-site
- gh-pages
+services:
+ - docker
+
matrix:
include:
- os: osx
@@ -53,13 +56,34 @@ before_install:
export DLOG_MODIFIED="true"
echo "Enable testing distributedlog modules if this pull request modifies files under directory `stream/distributedlog`."
fi
+ if [ `git diff --name-only $TRAVIS_COMMIT_RANGE | grep "^site\/" | wc -l` -gt 0 ]; then
+ # building the website to ensure the changes don't break
+ export WEBSITE_MODIFIED="true"
+ echo "Enable building website modules if this pull request modifies files under directory `site`."
+ fi
fi
script:
- - 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-*-bin.tar.gz; fi
- - if [ "$TRAVIS_OS_NAME" == "linux" ]; then dev/check-binary-license ./bookkeeper-dist/server/target/bookkeeper-server-*-bin.tar.gz; fi
- - if [ "$DLOG_MODIFIED" == "true" ]; then cd stream/distributedlog && travis_wait 60 mvn --batch-mode clean package -Ddistributedlog; fi
+- |
+ set -e
+ 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-*-bin.tar.gz;
+ dev/check-binary-license ./bookkeeper-dist/server/target/bookkeeper-server-*-bin.tar.gz;
+ fi
+ if [ "$DLOG_MODIFIED" == "true" ]; then
+ cd stream/distributedlog
+ travis_wait 60 mvn --batch-mode clean package -Ddistributedlog
+ cd ../..
+ fi
+ if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$WEBSITE_MODIFIED" == "true" ]; then
+ cd site
+ make clean
+ # run the docker image to build the website
+ ./docker/ci.sh
+ cd ..
+ 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/site/_config.yml b/site/_config.yml
index 9a059c3..1300a3f 100644
--- a/site/_config.yml
+++ b/site/_config.yml
@@ -67,3 +67,4 @@ exclude:
- scripts
- overview
- README.md
+
--
To stop receiving notification emails like this one, please contact
sijie@apache.org.