-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4a5d194
commit caf97cb
Showing
11 changed files
with
398 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD) | ||
USER=$(shell whoami) | ||
STAGING_URL="https://docs-mongodborg-staging.corp.mongodb.com" | ||
PRODUCTION_URL="https://docs.mongodb.com" | ||
STAGING_BUCKET=docs-mongodb-org-staging | ||
PRODUCTION_BUCKET= | ||
PROJECT=kafka-connector | ||
|
||
# Parse our published-branches configuration file to get the name of | ||
# the current "stable" branch. This is weird and dumb, yes. | ||
STABLE_BRANCH=`grep 'manual' build/docs-tools/data/${PROJECT}-published-branches.yaml | cut -d ':' -f 2 | grep -Eo '[0-9a-z.]+'` | ||
|
||
.PHONY: help html publish stage deploy deploy-search-index redirects | ||
|
||
help: ## Show this help message | ||
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | ||
@echo | ||
@echo 'Variables' | ||
@printf " \033[36m%-18s\033[0m %s\n" 'ARGS' 'Arguments to pass to mut-publish' | ||
|
||
html: ## Builds this branch's HTML under build/<branch>/html | ||
giza make html | ||
|
||
publish: ## Builds this branch's publishable HTML and other artifacts under build/public | ||
giza make publish | ||
if [ ${GIT_BRANCH} = master ]; then mut-redirects config/redirects -o build/public/.htaccess; fi | ||
|
||
stage: ## Host online for review | ||
mut-publish build/${GIT_BRANCH}/html ${STAGING_BUCKET} --prefix=${PROJECT} --stage ${ARGS} | ||
@echo "Hosted at ${STAGING_URL}/${PROJECT}/${USER}/${GIT_BRANCH}/index.html" | ||
|
||
deploy: build/public ## Deploy to the production bucket | ||
mut-publish build/public ${PRODUCTION_BUCKET} --prefix=${PROJECT} --deploy --redirect-prefix='kafka-connector' ${ARGS} | ||
|
||
@echo "Hosted at ${PRODUCTION_URL}/${PROJECT}/index.html" | ||
|
||
$(MAKE) deploy-search-index | ||
|
||
deploy-search-index: ## Update the search index for this branch | ||
@echo "Building search index" | ||
if [ ${STABLE_BRANCH} = ${GIT_BRANCH} ]; then \ | ||
mut-index upload build/public/${GIT_BRANCH} -o kafka-connector-current.json --aliases kafka-connector-${GIT_BRANCH} -u ${PRODUCTION_URL}/${PROJECT}/current -g -s; \ | ||
else \ | ||
mut-index upload build/public/${GIT_BRANCH} -o kafka-connector-${GIT_BRANCH}.json -u ${PRODUCTION_URL}/${PROJECT}/${GIT_BRANCH} -s; \ | ||
fi | ||
|
||
redirects: | ||
if [ ${GIT_BRANCH} = master ]; then mut-redirects config/redirects -o build/public/.htaccess; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<site | ||
base_url="https://docs.mongodb.org/kafka-connector/" | ||
store_into="build/master/sitemap.xml.gz" | ||
verbose="1" | ||
> | ||
|
||
<directory | ||
path="build/public/" | ||
url="https://docs.mongodb.org/kafka-connector/" | ||
default_file="index.html" | ||
/> | ||
<filter action="drop" type="wildcard" pattern="*~" /> | ||
<filter action="drop" type="wildcard" pattern="*.txt" /> | ||
<filter action="drop" type="wildcard" pattern="*_t" /> | ||
<filter action="drop" type="wildcard" pattern="*.inv" /> | ||
<filter action="drop" type="wildcard" pattern="*.asc" /> | ||
<filter action="drop" type="wildcard" pattern="*.js" /> | ||
<filter action="drop" type="wildcard" pattern="*.gif" /> | ||
<filter action="drop" type="wildcard" pattern="*.png" /> | ||
<filter action="drop" type="regexp" pattern="/\.[^/]*" /> | ||
<filter action="drop" type="wildcard" pattern="*/single*"/> | ||
<filter action="drop" type="wildcard" pattern="*/_static/*" /> | ||
<filter action="drop" type="wildcard" pattern="*/_images/*" /> | ||
<filter action="drop" type="wildcard" pattern="*/search/" /> | ||
</site> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# -*- coding: utf-8 -*- | ||
# | ||
# MongoDB documentation build configuration file, created by | ||
# sphinx-quickstart on Mon Oct 3 09:58:40 2011. | ||
# | ||
# This file is execfile()d with the current directory set to its containing dir. | ||
|
||
import base64 | ||
import sys | ||
import os.path | ||
import datetime | ||
|
||
project_root = os.path.join(os.path.abspath(os.path.dirname(__file__))) | ||
sys.path.append(project_root) | ||
|
||
from giza.config.runtime import RuntimeStateConfig | ||
from giza.config.helper import fetch_config, get_versions, get_manual_path | ||
|
||
conf = fetch_config(RuntimeStateConfig()) | ||
intersphinx_libs = conf.system.files.data.intersphinx | ||
pdfs = conf.system.files.data.pdfs | ||
sconf = conf.system.files.data.sphinx_local | ||
|
||
sys.path.append(os.path.join(conf.paths.projectroot, conf.paths.buildsystem, 'sphinxext')) | ||
|
||
# -- General configuration ---------------------------------------------------- | ||
|
||
needs_sphinx = '1.0' | ||
|
||
extensions = [ | ||
'sphinx.ext.extlinks', | ||
'sphinx.ext.todo', | ||
'mongodb', | ||
'directives', | ||
'intermanual', | ||
'fasthtml', | ||
'tabs' | ||
] | ||
|
||
templates_path = ['.templates'] | ||
exclude_patterns = [] | ||
|
||
source_suffix = '.txt' | ||
|
||
master_doc = sconf.master_doc | ||
language = 'en' | ||
project = sconf.project | ||
copyright = u'2008-{0}'.format(datetime.date.today().year) | ||
|
||
version = conf.version.branch | ||
release = conf.version.release | ||
|
||
rst_epilog = '\n'.join([ | ||
'.. |branch| replace:: ``{0}``'.format(conf.git.branches.current), | ||
'.. |copy| unicode:: U+000A9', | ||
'.. |year| replace:: {0}'.format(datetime.date.today().year), | ||
'.. |ent-build| replace:: MongoDB Enterprise', | ||
'.. |hardlink| replace:: https://docs.mongodb.com/kafka-connector/', | ||
]) | ||
|
||
extlinks = { | ||
'issue': ('https://jira.mongodb.org/browse/%s', '' ), | ||
'manual': ('http://docs.mongodb.com/manual%s', ''), | ||
} | ||
|
||
intersphinx_mapping = {} | ||
for i in intersphinx_libs: | ||
intersphinx_mapping[i.name] = (i.url, os.path.join(conf.paths.projectroot, | ||
conf.paths.output, i.path)) | ||
|
||
languages = [ | ||
("ar", "Arabic"), | ||
("cn", "Chinese"), | ||
("cs", "Czech"), | ||
("de", "German"), | ||
("es", "Spanish"), | ||
("fr", "French"), | ||
("hu", "Hungarian"), | ||
("id", "Indonesian"), | ||
("it", "Italian"), | ||
("jp", "Japanese"), | ||
("ko", "Korean"), | ||
("lt", "Lithuanian"), | ||
("pl", "Polish"), | ||
("pt", "Portuguese"), | ||
("ro", "Romanian"), | ||
("ru", "Russian"), | ||
("tr", "Turkish"), | ||
("uk", "Ukrainian") | ||
] | ||
|
||
# -- Options for HTML output --------------------------------------------------- | ||
|
||
html_theme = sconf.theme.name | ||
html_theme_path = [ os.path.join(conf.paths.buildsystem, 'themes') ] | ||
html_title = conf.project.title | ||
htmlhelp_basename = 'MongoDBdoc' | ||
|
||
html_logo = ".static/logo-mongodb.png" | ||
html_static_path = ['source/.static'] | ||
html_last_updated_fmt = '%b %d, %Y' | ||
|
||
html_copy_source = False | ||
html_domain_indices = True | ||
html_use_index = True | ||
html_split_index = False | ||
html_show_sourcelink = False | ||
html_show_sphinx = True | ||
html_show_copyright = True | ||
|
||
manual_edition_path = '{0}/{1}/{2}.{3}' | ||
|
||
html_theme_options = { | ||
'branch': conf.git.branches.current, | ||
'translations': languages, | ||
'language': language, | ||
'manual_path': "kafka-connector", | ||
'repo_name': 'docs-kafka-connector', | ||
'jira_project': 'DOCSP', | ||
'google_analytics': sconf.theme.google_analytics, | ||
'project': sconf.project, | ||
'epubpath': manual_edition_path.format(conf.project.url, | ||
conf.project.basepath, | ||
'mongodb-kafka-connector', 'epub'), | ||
'nav_excluded': sconf.theme.nav_excluded, | ||
'version_selector': get_versions(conf), | ||
'is_upcoming': False, | ||
} | ||
|
||
html_sidebars = sconf.sidebars | ||
|
||
|
||
# -- Options for Epub output --------------------------------------------------- | ||
|
||
# Bibliographic Dublin Core info. | ||
epub_title = conf.project.title | ||
epub_author = u'MongoDB Documentation Project' | ||
epub_publisher = u'MongoDB, Inc.' | ||
epub_copyright = copyright | ||
epub_theme = 'epub_mongodb' | ||
epub_tocdup = True | ||
epub_tocdepth = 3 | ||
epub_language = 'en' | ||
epub_scheme = 'url' | ||
epub_identifier = 'http://docs.mongodb.org/kafka-connector/' | ||
epub_exclude_files = [] | ||
epub_pre_files = [] | ||
epub_post_files = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
git: | ||
remote: | ||
upstream: '10gen/docs-kafka-connector' | ||
tools: 'mongodb/docs-tools' | ||
project: | ||
name: 'kafka-connector' | ||
tag: 'kafka-connector' | ||
url: 'https://docs.mongodb.com/kafka-connector' | ||
title: "MongoDB Kafka Connector" | ||
branched: true | ||
system: | ||
tools: | ||
ref: HEAD | ||
pinned: false | ||
make: | ||
generated: | ||
- 'sphinx' | ||
- 'meta' | ||
- 'push' | ||
- 'integration' | ||
static: | ||
- 'makefile.compatibility' | ||
- 'makefile.clean' | ||
files: | ||
- 'pdfs.yaml' | ||
- 'intersphinx.yaml' | ||
- 'push.yaml' | ||
- 'integration.yaml' | ||
- 'sphinx_local.yaml' | ||
- htaccess: ['htaccess.yaml'] | ||
version: | ||
release: '0.1' | ||
branch: 'master' | ||
assets: | ||
- branch: master | ||
path: build/docs-tools | ||
repository: https://github.com/mongodb/docs-tools.git | ||
paths: | ||
output: 'build' | ||
source: 'source' | ||
includes: 'source/includes' | ||
images: 'source/images' | ||
tools: 'bin' | ||
buildsystem: 'build/docs-tools' | ||
builddata: 'config' | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
base: | ||
links: | ||
- { '0.1': 'master' } | ||
- { 'current': 'master' } | ||
targets: | ||
- html | ||
- dirhtml | ||
doc-root: | ||
- '' | ||
- '.htaccess' | ||
branch-root: null | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: mongodb | ||
url: https://docs.mongodb.com/manual/ | ||
path: mongodb.inv | ||
--- | ||
name: python | ||
url: https://docs.python.org/2/ | ||
path: python2.inv | ||
--- | ||
name: clouddocs | ||
url: https://docs.atlas.mongodb.com/ | ||
path: cloud-docs.inv | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
define: base https://docs.mongodb.com/kafka-connector | ||
define: versions v0.1 master | ||
symlink: v0.1 -> master | ||
symlink: upcoming -> master | ||
symlink: current -> v0.1 | ||
|
||
raw: kafka-connector/ -> ${base}/current |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
file: '/meta/google-compute-engine' | ||
branches: | ||
- 'kafka-connector' | ||
... |
Oops, something went wrong.