You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by da...@apache.org on 2017/02/09 05:18:08 UTC

[1/2] beam-site git commit: Add documentation to build the site with a jekyll container

Repository: beam-site
Updated Branches:
  refs/heads/asf-site 221f388d3 -> c9a64d3b9


Add documentation to build the site with a jekyll container


Project: http://git-wip-us.apache.org/repos/asf/beam-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam-site/commit/fdd0a7ce
Tree: http://git-wip-us.apache.org/repos/asf/beam-site/tree/fdd0a7ce
Diff: http://git-wip-us.apache.org/repos/asf/beam-site/diff/fdd0a7ce

Branch: refs/heads/asf-site
Commit: fdd0a7cea9a81de2b922ed29914f03afd82c4e3f
Parents: 221f388
Author: Sourabh Bajaj <sb...@gmail.com>
Authored: Wed Feb 8 21:13:29 2017 -0800
Committer: Davor Bonaci <da...@google.com>
Committed: Wed Feb 8 21:17:39 2017 -0800

----------------------------------------------------------------------
 README.md          | 16 +++++++++++++---
 run_with_docker.sh | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/beam-site/blob/fdd0a7ce/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 9d1db8e..d836dcb 100644
--- a/README.md
+++ b/README.md
@@ -11,7 +11,7 @@ for additional formatting capabilities, this website uses
 [Twitter Bootstrap](http://getbootstrap.com/).
 
 ### Repository Structure
-    
+
 This repository contains:
 
 1. `src/`: the source of the site, including markdown files containing the bulk of the content
@@ -28,11 +28,11 @@ a consistent environment for building the website, even across multiple develope
 
 	$ gem install bundler
 
-Use Bundler to download the versions of each dependency specified in the website's `Gemfile.lock`, 
+Use Bundler to download the versions of each dependency specified in the website's `Gemfile.lock`,
 including [Jekyll](https://jekyllrb.com/):
 
 	$ bundle install --deployment
-	
+
 This will install a number of gems in a local `./vendor` directory.
 
 ### Active development
@@ -56,6 +56,16 @@ get tricky, so please leave this directory out of your commits and pull request
 
 The committer doing the final merge will generate the `content/` directory at that time.
 
+### Running using Docker
+
+**Note:** This is an optional method if you don't want to install gems locally and just use a container for development. The helper script is written for UNIX systems but should be fairly easy to modify to get it working on Windows.
+
+Prerequisites: Make sure you have Docker installed on your machine.
+
+For building the site, use the command `./run_with_docker.sh server`. This will start the webserver inside a Docker container and port forward to your local machine at `localhost:4000`. We'll use the official Jekyll image to build the site.
+
+For running the website tests, use `./run_with_docker.sh test`.
+
 ## Additional Information
 
 ### Writing blog posts

http://git-wip-us.apache.org/repos/asf/beam-site/blob/fdd0a7ce/run_with_docker.sh
----------------------------------------------------------------------
diff --git a/run_with_docker.sh b/run_with_docker.sh
new file mode 100755
index 0000000..47ff9a1
--- /dev/null
+++ b/run_with_docker.sh
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+#    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.
+#
+
+# This script will run Jekyll inside Docker to build the site.
+#
+# Use "./run_with_docker.sh server" to build the site at localhost:4000.
+# Use "./run_with_docker.sh test" to test for any broken links.
+#
+# The script assumes you have docker installed on the machine.
+
+_runner() {
+  docker run --rm -it -v "$PWD":/srv/jekyll -p 4000:4000 \
+    --env="BUNDLE_CACHE=true" \
+    --env="BUNDLE_PATH=/srv/jekyll/vendor/bundle" \
+    jekyll/jekyll \
+    bash -c "bundle config build.nokogiri --use-system-libraries && bundle install && $@"
+}
+
+# If no argument is passed then just print the help
+if [[ $# -ne 1 ]] ; then
+  echo "Method to run was not passed, should be server/test";
+  exit 0;
+fi
+
+case "$1" in
+  server)
+    _runner "bundle exec jekyll server --force_polling --watch -H 0.0.0.0 -P 4000 --incremental";
+    ;;
+  test)
+    _runner "bundle exec rake test";
+    ;;
+  *)
+    echo "Unknown Argument $1 passed to the script";
+    ;;
+esac;


[2/2] beam-site git commit: This closes #148

Posted by da...@apache.org.
This closes #148


Project: http://git-wip-us.apache.org/repos/asf/beam-site/repo
Commit: http://git-wip-us.apache.org/repos/asf/beam-site/commit/c9a64d3b
Tree: http://git-wip-us.apache.org/repos/asf/beam-site/tree/c9a64d3b
Diff: http://git-wip-us.apache.org/repos/asf/beam-site/diff/c9a64d3b

Branch: refs/heads/asf-site
Commit: c9a64d3b971cd3debbce31aef6bd41c96fa67d67
Parents: 221f388 fdd0a7c
Author: Davor Bonaci <da...@google.com>
Authored: Wed Feb 8 21:17:51 2017 -0800
Committer: Davor Bonaci <da...@google.com>
Committed: Wed Feb 8 21:17:51 2017 -0800

----------------------------------------------------------------------
 README.md          | 16 +++++++++++++---
 run_with_docker.sh | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 63 insertions(+), 3 deletions(-)
----------------------------------------------------------------------