Add the basic scaffolding for building the site with GNU/Make and Docker rather than Gradle

This will speed things up quite a bit and ensure that everybody's local
development environment/patterns are consistent.
This commit is contained in:
R. Tyler Croy 2017-07-26 12:45:55 -07:00
parent 3e20e5d17e
commit 7b32a0ca73
No known key found for this signature in database
GPG Key ID: 1426C7DC3F51E16F
6 changed files with 55 additions and 16 deletions

1
.gitignore vendored
View File

@ -37,3 +37,4 @@ content/doc/developer/extensions/*.adoc
/Gemfile.lock
/content/_site/
/content/_tmp/
vendor/

26
Gemfile
View File

@ -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
Makefile Normal file
View File

@ -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

View File

@ -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

0
scripts/fetch-external-resources Normal file → Executable file
View File

0
scripts/generate-handbook-pdf Normal file → Executable file
View File