Skip to content

Commit

Permalink
Add the basic scaffolding for building the site with GNU/Make and Doc…
Browse files Browse the repository at this point in the history
…ker rather than Gradle

This will speed things up quite a bit and ensure that everybody's local
development environment/patterns are consistent.
  • Loading branch information
R. Tyler Croy committed Jul 26, 2017
1 parent 3e20e5d commit 7b32a0c
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 16 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -37,3 +37,4 @@ content/doc/developer/extensions/*.adoc
/Gemfile.lock
/content/_site/
/content/_tmp/
vendor/
26 changes: 12 additions & 14 deletions Gemfile
@@ -1,25 +1,23 @@
source 'https://rubygems.org'

# This file exists as a manually updated mirror of what is hosted in
# build.gradle.
#
# It is only intended to make "power users" and frequent
# contributors to the jenkins.io repository more effective by allowing them to
# circumvent some of the JRuby/Gradle performance bottlenecks
#
# See this section for more:
# <https://github.com/jenkins-infra/jenkins.io/blob/master/CONTRIBUTING.adoc#advanced-building>

gem 'colorize'
gem 'awestruct', '~> 0.5.7'
gem 'awestruct-ibeams', '~> 0.4'
gem 'asciidoctor-jenkins-extensions', '~> 0.2.0'
gem 'asciidoctor-jenkins-extensions'
gem 'asciidoctor', '~> 1.5.5'

gem 'faraday', '~> 0.9.2'

# Support for various template engines we use
gem 'haml', '~> 4.0'
gem 'haml', '~> 4.0.7'
gem 'liquid', '~> 3.0'
gem 'kramdown', '~> 1.9.0'

# Gems necessary for running scripts/fetch-external-resources
group :fetcher do
gem 'faraday', '~> 0.9.2'
gem 'faraday_middleware', '~> 0.9.2'
gem 'rubyzip', '~> 1.2.0'
end

group :pdfs do
gem 'asciidoctor-pdf', '1.5.0.alpha.15'
end
42 changes: 42 additions & 0 deletions Makefile
@@ -0,0 +1,42 @@
OUTPUT_DIR=build/_site
AWESTRUCT_CONFIG=--source-dir=content --output-dir=$(OUTPUT_DIR)

all: fetch generate pdfs

run: warning depends
LISTEN=true ./scripts/ruby bundle exec awestruct --bind 0.0.0.0 --dev $(AWESTRUCT_CONFIG)

depends:
./scripts/ruby bundle install --path=vendor/gems

generate: warning depends $(OUTPUT_DIR)/releases.rss
./scripts/ruby bundle exec awestruct --generate --verbose $(AWESTRUCT_CONFIG)

$(OUTPUT_DIR)/releases.rss: scripts/release.rss.groovy
./scripts/groovy scripts/release.rss.groovy 'https://updates.jenkins.io/release-history.json' > $(OUTPUT_DIR)/releases.rss

pdfs: $(OUTPUT_DIR)/user-handbook.pdf

$(OUTPUT_DIR)/user-handbook.pdf: depends scripts/generate-handbook-pdf
./scripts/ruby scripts/generate-handbook-pdf user-handbook.adoc
./scripts/ruby bundle exec asciidoctor-pdf -a allow-uri-read \
--base-dir content \
--out-file $(OUTPUT_DIR)/user-handbook.pdf \
user-handbook.adoc

fetch: depends scripts/fetch-examples scripts/fetch-external-resources
./scripts/fetch-examples
./scripts/ruby bundle exec ./scripts/fetch-external-resources

warning:
@echo '-------------------------------------------------------------'
@echo ">> To save time, this won't automatically run \`make fetch\`."
@echo ">> Please ensure you have run \`make fetch\` at least onces"
@echo '-------------------------------------------------------------'

clean:
rm -rf vendor/gems
rm -rf build/


.PHONY: all clean generate run fetch warning pdfs
2 changes: 0 additions & 2 deletions content/_config/site.yml
@@ -1,8 +1,6 @@
base_url: https://jenkins.io/
local_tz: UTC
base_title: Jenkins
generation:
in_threads: 0
google_analytics:
anonymizeIp: true
account: UA-4216293-5
Expand Down
Empty file modified scripts/fetch-external-resources 100644 → 100755
Empty file.
Empty file modified scripts/generate-handbook-pdf 100644 → 100755
Empty file.

0 comments on commit 7b32a0c

Please sign in to comment.