You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

The Metron website is a static site generated using Jekyll.  The markdown content is stored in master, but the generated static site is stored in a special branch, asf-site, which is pulled and served up by the ASF Infra team.

If you need to merge a pull request that involves a change to the website, you can follow the following steps:

  • Evaluate the change in Jekyll to ensure it looks ok and there are no issues (see below)
  • Commit the PR to master via the normal commit method
  • Commit the generated site to the asf-site branch

Evaluation

Prerequisites:

  • Ruby version 2.2+
  • sudo gem install bundler
  • sudo gem install jekyll

To evaluate a website change, you should

  • Clone the repo associated with the PR
  • From metron/site execute
    • bundle install
    • bundle exec jekyll serve
  • Navigate to http://localhost:4000 to review the site

  • This will create the static site in the target directory.

Committing the Generated Site

After the requisite +1's are obtained, you should commit this branch to master via the normal commit method.  You still, however, need to push the generated site to the asf-site branch.

This is done by the following steps:

  • From master, execute the following from metron/site
    • bundle install
    • bundle exec jekyll serve

 

  • Ensure that the website comes up on http://localhost:4000 and exit whenever that is done
  • Save off a zipped copy of metron/site/target
  • Checkout the asf-site branch
    • Ensure at git status says you have no untracked files.  Sometimes a checkout will bring along some rogue files that are untracked in master such as target directories.
  • Unzip the copy of the target into metron
  • Ensure that the change looks right by running python -m SimpleHTTPServer and navigating to http://localhost:8000
  • Commit locally with a commit message that references the JIRA. e.g. METRON-177: Sync'ing asf-site from the generated code on master.
  • Push to apache via git push apache asf-site (assuming you named the apache remote repo 'apache')

Troubleshooting

If you have trouble installing Jekyll you may need to add some additional tools to get it to compile. This worked for me on Mac OSX 10.13.1 (High Sierra), Homebrew 1.5.3, Ruby 2.5.0p0. (Skip the ruby install if you already have it configured properly.)

brew install ruby
brew install autoconf
brew install automake
brew install libtool

 

  • No labels