This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 5d6a667 [hotfix][travis] Cache documentation gems separately
5d6a667 is described below
commit 5d6a66748172ae1c18340c1bc132ca32d7e1b88c
Author: Chesnay Schepler <[email protected]>
AuthorDate: Sat Apr 27 11:43:52 2019 +0200
[hotfix][travis] Cache documentation gems separately
The .rvm directory contains a bunch of travis-provided gems, which we don't
need to cache. Additionally, these were cached in all profiles, not just the
documentation ones.
We now cache gems required for the documentation separately.
---
.travis.yml | 3 ++-
docs/build_docs.sh | 3 ++-
tools/travis/docs.sh | 2 +-
tools/travis_controller.sh | 1 +
4 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/.travis.yml b/.travis.yml
index bcea10a..e97a039 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -23,11 +23,12 @@ cache:
# default timeout is too low
timeout: 600
directories:
- - $HOME/.rvm/
- $HOME/.m2
- $HOME/flink_cache
# keep in sync with tools/travis/setup_maven.sh
- $HOME/maven_cache
+ # keep in sync with tools/travis/docs.sh
+ - $HOME/gem_cache
# do not cache our own artifacts
before_cache:
diff --git a/docs/build_docs.sh b/docs/build_docs.sh
index aa08f4c..40de149 100755
--- a/docs/build_docs.sh
+++ b/docs/build_docs.sh
@@ -19,6 +19,7 @@
RUBY=${RUBY:-ruby}
GEM=${GEM:-gem}
+CACHE_DIR=${CACHE_DIR:-".rubydeps"}
set -e
cd "$(dirname ${BASH_SOURCE[0]})"
@@ -42,7 +43,7 @@ if [ "`command -v bundle`" == "" ]; then
fi
# Install Ruby dependencies locally
-bundle install --path .rubydeps
+bundle install --path ${CACHE_DIR}
DOCS_SRC=${DIR}
DOCS_DST=${DOCS_SRC}/content
diff --git a/tools/travis/docs.sh b/tools/travis/docs.sh
index 4f1becd..bbda653 100755
--- a/tools/travis/docs.sh
+++ b/tools/travis/docs.sh
@@ -17,7 +17,7 @@
# limitations under the License.
################################################################################
-.docs/build_docs.sh -p &
+CACHE_DIR=$HOME/gem_cache ./docs/build_docs.sh -p &
for i in `seq 1 30`;
do
diff --git a/tools/travis_controller.sh b/tools/travis_controller.sh
index 4a466e4..e3045e5 100755
--- a/tools/travis_controller.sh
+++ b/tools/travis_controller.sh
@@ -65,6 +65,7 @@ print_system_info() {
echo "RVM: $(du -s --si $HOME/.rvm)"
echo "Flink: $(du -s --si $HOME/flink_cache)"
echo "Maven (binaries): $(du -s --si $HOME/maven_cache)"
+ echo "gems: $(du -s -si $HOME/gem_cache)"
end_fold "cache_info"
}