Skip to content

Commit

Permalink
[FLINK-5344] Fixed the dockerized doc build, which has been broken fo…
Browse files Browse the repository at this point in the history
…r a while. Fixed the -p option. Reverted the main Gemfile back to ruby 1.9 to make the build bot happy, and created a new Gemfile in ruby2/Gemfile to keep the incremental build option available.

This closes apache#3016.
  • Loading branch information
alpinegizmo authored and mxm committed Dec 16, 2016
1 parent 27ebdf7 commit 4a27d21
Show file tree
Hide file tree
Showing 8 changed files with 175 additions and 37 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,7 @@ out/
/docs/content
/docs/.bundle
/docs/.rubydeps
/docs/ruby2/.bundle
/docs/ruby2/.rubydeps
*.ipr
*.iws
14 changes: 7 additions & 7 deletions docs/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
################################################################################

source 'https://rubygems.org'
ruby '~> 2.3.0'

# Dependencies required to build the Flink docs
gem 'jekyll', '~> 3.3.0'
gem 'kramdown', '~> 1.13.0'
ruby '>= 1.9.0'

gem 'jekyll', '2.5.3'
gem 'kramdown', '1.10.0'
gem 'addressable', '2.4.0'
gem 'octokit', '~> 4.3.0'
gem 'pygments.rb', '0.6.3'
gem 'therubyracer', '0.12.2'
group :jekyll_plugins do
gem 'hawkins'
end
gem 'json'
74 changes: 47 additions & 27 deletions docs/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,67 +1,87 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
colorator (1.1.0)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.1)
addressable (2.4.0)
blankslate (2.1.2.4)
classifier-reborn (2.0.4)
fast-stemmer (~> 1.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.11.1)
colorator (0.1)
execjs (2.7.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
fast-stemmer (1.0.2)
ffi (1.9.14)
forwardable-extended (2.6.0)
hawkins (2.0.4)
em-websocket (~> 0.5)
jekyll (~> 3.1)
http_parser.rb (0.6.0)
jekyll (3.3.1)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll (2.5.3)
classifier-reborn (~> 2.0)
colorator (~> 0.1)
jekyll-coffeescript (~> 1.0)
jekyll-gist (~> 1.0)
jekyll-paginate (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
liquid (~> 2.6.1)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
pygments.rb (~> 0.6.0)
redcarpet (~> 3.1)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
jekyll-coffeescript (1.0.1)
coffee-script (~> 2.2)
jekyll-gist (1.4.0)
octokit (~> 4.3.0)
jekyll-paginate (1.1.0)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
kramdown (1.13.1)
json (1.8.3)
kramdown (1.10.0)
libv8 (3.16.14.17)
liquid (3.0.6)
liquid (2.6.3)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
multipart-post (2.0.0)
octokit (4.3.0)
sawyer (~> 0.7.0, >= 0.5.3)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.12)
public_suffix (2.0.4)
pygments.rb (0.6.3)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.2.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
redcarpet (3.3.4)
ref (2.0.0)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.22)
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
faraday (~> 0.8, < 0.10)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
toml (0.1.2)
parslet (~> 1.5.0)
yajl-ruby (1.2.1)

PLATFORMS
ruby

DEPENDENCIES
hawkins
jekyll (~> 3.3.0)
kramdown (~> 1.13.0)
addressable (= 2.4.0)
jekyll (= 2.5.3)
json
kramdown (= 1.10.0)
octokit (~> 4.3.0)
pygments.rb (= 0.6.3)
therubyracer (= 0.12.2)

Expand Down
10 changes: 9 additions & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,15 @@ to `docs/content/index.html` and start reading.

If you call the script with the preview flag `build_docs.sh -p`, Jekyll will
start a web server at `localhost:4000` and watch the docs directory for
updates. Use this mode to preview changes locally.
updates. Use this mode to preview changes locally.

If you have ruby 2.0 or greater,
you can call the script with the incremental flag `build_docs.sh -i`.
Jekyll will then serve a live preview at `localhost:4000`,
and it will be much faster because it will only rebuild the pages corresponding
to files that are modified. Note that if you are making changes that affect
the sidebar navigation, you'll have to build the entire site to see
those changes reflected on every page.

# Contribute

Expand Down
7 changes: 5 additions & 2 deletions docs/build_docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,16 @@ DOCS_DST=${DOCS_SRC}/content
JEKYLL_CMD="build"

# if -p flag is provided, serve site on localhost
# -i is like -p, but incremental (which has some issues, but is very fast)
while getopts ":p:i" opt; do
# -i is like -p, but incremental (only rebuilds the modified file)
while getopts "pi" opt; do
case $opt in
p)
JEKYLL_CMD="serve --baseurl= --watch"
;;
i)
[[ `ruby -v` =~ 'ruby 1' ]] && echo "Error: building the docs with the incremental option requires at least ruby 2.0" && exit 1
cd ruby2
bundle install --path .rubydeps
JEKYLL_CMD="liveserve --baseurl= --watch --incremental"
;;
esac
Expand Down
30 changes: 30 additions & 0 deletions docs/ruby2/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
################################################################################
# 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
#
# https://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.
################################################################################

source 'https://rubygems.org'

ruby '~> 2'

gem 'jekyll', '~> 3.3.0'
gem 'kramdown', '~> 1.13.0'
gem 'json'
group :jekyll_plugins do
gem 'hawkins'
end
gem 'pygments.rb', '0.6.3'
gem 'therubyracer', '0.12.2'
74 changes: 74 additions & 0 deletions docs/ruby2/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.5.0)
public_suffix (~> 2.0, >= 2.0.2)
colorator (1.1.0)
em-websocket (0.5.1)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0)
eventmachine (1.2.1)
ffi (1.9.14)
forwardable-extended (2.6.0)
hawkins (2.0.4)
em-websocket (~> 0.5)
jekyll (~> 3.1)
http_parser.rb (0.6.0)
jekyll (3.3.1)
addressable (~> 2.4)
colorator (~> 1.0)
jekyll-sass-converter (~> 1.0)
jekyll-watch (~> 1.1)
kramdown (~> 1.3)
liquid (~> 3.0)
mercenary (~> 0.3.3)
pathutil (~> 0.9)
rouge (~> 1.7)
safe_yaml (~> 1.0)
jekyll-sass-converter (1.5.0)
sass (~> 3.4)
jekyll-watch (1.5.0)
listen (~> 3.0, < 3.1)
json (2.0.2)
kramdown (1.13.1)
libv8 (3.16.14.17)
liquid (3.0.6)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
mercenary (0.3.6)
pathutil (0.14.0)
forwardable-extended (~> 2.6)
posix-spawn (0.3.12)
public_suffix (2.0.4)
pygments.rb (0.6.3)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.2.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.7)
ffi (>= 0.5.0)
ref (2.0.0)
rouge (1.11.1)
safe_yaml (1.0.4)
sass (3.4.22)
therubyracer (0.12.2)
libv8 (~> 3.16.14.0)
ref
yajl-ruby (1.2.1)

PLATFORMS
ruby

DEPENDENCIES
hawkins
jekyll (~> 3.3.0)
json
kramdown (~> 1.13.0)
pygments.rb (= 0.6.3)
therubyracer (= 0.12.2)

RUBY VERSION
ruby 2.3.0p0

BUNDLED WITH
1.13.6
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ under the License.
<!-- External web libraries. -->
<exclude>docs/**/bootstrap*</exclude>
<exclude>docs/Gemfile.lock</exclude>
<exclude>docs/ruby2/Gemfile.lock</exclude>
<exclude>docs/img/*.svg</exclude>
<exclude>**/docs/page/font-awesome/**</exclude>
<exclude>**/resources/**/font-awesome/**</exclude>
Expand Down

0 comments on commit 4a27d21

Please sign in to comment.