Skip to content

Commit 77bec98

Browse files
first commit
0 parents  commit 77bec98

20 files changed

+944
-0
lines changed

.evergreen.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
---
2+
buildvariants:
3+
- display_name: "Ubuntu 18.04"
4+
expansions:
5+
venv: venv/bin
6+
name: ubuntu1804
7+
run_on:
8+
- ubuntu1804-test
9+
tasks:
10+
- name: build-k8s-ops-docs
11+
tasks:
12+
- commands:
13+
- command: git.get_project
14+
params:
15+
directory: docs-k8s-ops
16+
type: setup
17+
- command: shell.exec
18+
params:
19+
script: |
20+
21+
# Remove existing Virtual Environment Directory
22+
23+
rm -rf venv
24+
25+
# Set new Virtual Environment with Python 3
26+
27+
virtualenv -p python3 venv
28+
29+
# Set Build Directory
30+
31+
BUILDHOME=$PWD
32+
33+
# Add Virtual Environment Path to Path
34+
35+
PATH=$PATH:$PWD/${venv}
36+
37+
# Activate Virtual Environment
38+
39+
source ${venv}/activate
40+
41+
cd venv
42+
mkdir dev
43+
cd dev
44+
45+
# Install Current Version of mut
46+
47+
$BUILDHOME/${venv}/python3 -m pip install mut
48+
49+
shell: bash
50+
working_dir: docs-k8s-ops
51+
- command: shell.exec
52+
params:
53+
script: |
54+
# remember that this script should be silent if it
55+
# manipulates keys.
56+
57+
echo "export AWS_ACCESS_KEY_ID=${aws_key}" > aws-config.sh
58+
echo "export AWS_SECRET_ACCESS_KEY=${aws_secret}" >> aws-config.sh
59+
echo "export STAGING_USERNAME=${github_author}" >> aws-config.sh
60+
chmod 755 aws-config.sh
61+
62+
shell: bash
63+
silent: true
64+
working_dir: docs-k8s-ops
65+
-
66+
command: shell.exec
67+
loggers:
68+
task:
69+
- type: evergreen
70+
- type: file
71+
params:
72+
script: |
73+
74+
# Get AWS Variables
75+
76+
source aws-config.sh
77+
78+
export GIT_BRANCH="${github_pr_number}"
79+
80+
# Activate Virtual Environment
81+
82+
source ${venv}/activate
83+
84+
if [ "${is_patch}" != "true" ]; then
85+
make html
86+
else
87+
make html
88+
make stage
89+
fi
90+
shell: bash
91+
working_dir: docs-k8s-ops
92+
name: build-k8s-ops-docs

.gitignore

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
.DS_Store
2+
build/*
3+
*.swp
4+
.#*
5+
\#*#
6+
*.pyc
7+
*.pyo
8+
fabfile
9+
docs_meta.yaml
10+
meta.yaml
11+
source/includes/table-*rst
12+
source/includes/hash.rst
13+
source/includes/toc-*rst
14+
source/includes/dfn-*rst
15+
source/includes/table-*rst
16+
source/includes/toc/
17+
source/includes/table/
18+
source/includes/steps/
19+
handouts/build
20+
handouts/logo.png
21+
handouts/mongodb-logo.eps
22+
handouts/mongodb-logo-eps-converted-to.pdf
23+
source/figures/
24+
giza.log
25+
backups/*

.static/logo-mongodb.png

3.19 KB
Loading

Makefile

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
GIT_BRANCH=$(shell git rev-parse --abbrev-ref HEAD)
2+
ifeq ($(STAGING_USERNAME),)
3+
USER=$(shell whoami)
4+
else
5+
USER=$(STAGING_USERNAME)
6+
endif
7+
STAGING_URL="https://docs-mongodborg-staging.corp.mongodb.com"
8+
PRODUCTION_URL="https://docs.mongodb.com/mongocli"
9+
STAGING_BUCKET=docs-mongodb-org-staging
10+
PRODUCTION_BUCKET=docs-mongocli-prod
11+
PROJECT=mongocli
12+
13+
# Parse our published-branches configuration file to get the name of
14+
# the current "stable" branch. This is weird and dumb, yes.
15+
STABLE_BRANCH=`grep 'manual' build/docs-tools/data/${PROJECT}-published-branches.yaml | cut -d ':' -f 2 | grep -Eo '[0-9a-z.]+'`
16+
17+
.PHONY: help html publish stage deploy deploy-search-index
18+
19+
## Show this help message
20+
help:
21+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
22+
@echo
23+
@echo 'Variables'
24+
@printf " \033[36m%-18s\033[0m %s\n" 'ARGS' 'Arguments to pass to mut-publish'
25+
26+
#################################################################
27+
#### ####
28+
#### BUILD DOCUMENTATION ARTIFACTS ####
29+
#### ####
30+
#################################################################
31+
32+
33+
#################################################################
34+
#### BUILD STAGING ARTIFACTS ####
35+
#################################################################
36+
37+
## Builds this branch's HTML under build/<branch>/html
38+
html:
39+
time giza make html
40+
41+
42+
#################################################################
43+
#### BUILD STAGING ARTIFACTS TO CLEAN DIRECTORY ####
44+
#################################################################
45+
46+
## Build this branch's HTML files to a fresh build directory
47+
clean-html:
48+
rm -rf build/${GIT_BRANCH}
49+
time giza make html
50+
51+
52+
#################################################################
53+
#### BUILD PRODUCTION ARTIFACTS ####
54+
#################################################################
55+
56+
## Builds this branch's publishable HTML and other artifacts under
57+
## build/public
58+
publish:
59+
giza make publish
60+
if [ ${GIT_BRANCH} = master ]; then mut-redirects config/redirects -o build/public/.htaccess; fi
61+
62+
63+
#################################################################
64+
#### ####
65+
#### DEPLOY KUBERNETES OPERATOR DOCUMENTATION ####
66+
#### ####
67+
#################################################################
68+
69+
70+
#################################################################
71+
#### DEPLOY KUBERNETES OPERATOR DOCUMENTATION TO STAGING ####
72+
#################################################################
73+
74+
## Host online for review
75+
stage:
76+
mut-publish build/${GIT_BRANCH}/html ${STAGING_BUCKET} --prefix=${PROJECT} --stage ${ARGS}
77+
@echo "\n\nHosted at ${STAGING_URL}/${PROJECT}/${USER}/${GIT_BRANCH}/index.html"
78+
79+
80+
#################################################################
81+
#### DEPLOY KUBERNETES OPERATOR DOCUMENTATION TO PRODUCTION ####
82+
#################################################################
83+
84+
## Deploy to the production bucket
85+
deploy: build/public
86+
mut-publish build/public ${PRODUCTION_BUCKET} --prefix=${PROJECT} --deploy --redirect-prefix='${PROJECT}' ${ARGS}
87+
88+
@echo "\n\nHosted at ${PRODUCTION_URL}/${PROJECT}/index.html"
89+
90+
$(MAKE) deploy-search-index
91+
92+
## Update the search index for this branch
93+
deploy-search-index:
94+
@echo "Building search index"
95+
if [ ${STABLE_BRANCH} = ${GIT_BRANCH} ]; then \
96+
mut-index upload build/public/${GIT_BRANCH} -o ${PROJECT}-current.json --aliases ${PROJECT}-${GIT_BRANCH} -u ${PRODUCTION_URL}/${PROJECT}/stable -g -s; \
97+
else \
98+
mut-index upload build/public/${GIT_BRANCH} -o ${PROJECT}-${GIT_BRANCH}.json -u ${PRODUCTION_URL}/${PROJECT}/${GIT_BRANCH} -s; \
99+
fi

README.rst

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
=========================
2+
MongoDB CLI Documentation
3+
=========================
4+
5+
This repository contains documentation for the MongoDB Atlas Data Lake.
6+
7+
Building
8+
--------
9+
10+
First install `mut <https://github.com/mongodb/mut>`_.
11+
12+
Then you can download and build this documentation locally with
13+
the following command:
14+
15+
git clone https://github.com/mongodb/datalake.git
16+
cd docs-datalake/
17+
make build
18+
19+
View ``build/master/html/index.html`` to view your current build of the
20+
documentation.
21+
22+
Contributing
23+
------------
24+
25+
To contribute to the documentation, please fork this repository on
26+
GitHub and issue a pull request. If you have not done so already,
27+
please sign the `MongoDB/10gen Contributor Agreement
28+
<https://www.mongodb.com/legal/contributor-agreement>`_.
29+
30+
See the following documents within this repository that provide a more
31+
thorough overview of the documentation style, and process. These links
32+
point back to the MongoDB Manual materials:
33+
34+
- `Style Guide <http://docs.mongodb.org/manual/meta/style-guide>`_
35+
- `Documentation Practices <http://docs.mongodb.org/manual/meta/practices>`_
36+
- `Documentation Organization <http://docs.mongodb.org/manual/meta/organization>`_
37+
- `Build Instructions <http://docs.mongodb.org/manual/meta/build>`_
38+
39+
File issue reports or requests at the `Documentation Jira Project
40+
<https://jira.mongodb.org/browse/DOCS>`_.
41+
42+
All documentation is available under the terms of a `Creative Commons
43+
License <http://creativecommons.org/licenses/by-nc-sa/3.0/>`_.
44+
45+
The MongoDB Documentation Project is governed by the terms of the
46+
`MongoDB/10gen Contributor Agreement
47+
<https://www.mongodb.com/legal/contributor-agreement>`_.
48+
49+
If you have any questions, please contact `[email protected]
50+
<mailto:[email protected]>`_.
51+
52+
-- The MongoDB/10gen Docs Team

conf-sitemap.xml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<site
3+
base_url="https://docs.mongodb.org/bi-connector/"
4+
store_into="build/master/sitemap.xml.gz"
5+
verbose="1"
6+
>
7+
8+
<directory
9+
path="build/public/"
10+
url="https://docs.mongodb.org/bi-connector/"
11+
default_file="index.html"
12+
/>
13+
<filter action="drop" type="wildcard" pattern="*~" />
14+
<filter action="drop" type="wildcard" pattern="*.txt" />
15+
<filter action="drop" type="wildcard" pattern="*_t" />
16+
<filter action="drop" type="wildcard" pattern="*.inv" />
17+
<filter action="drop" type="wildcard" pattern="*.asc" />
18+
<filter action="drop" type="wildcard" pattern="*.js" />
19+
<filter action="drop" type="wildcard" pattern="*.gif" />
20+
<filter action="drop" type="wildcard" pattern="*.png" />
21+
<filter action="drop" type="regexp" pattern="/\.[^/]*" />
22+
<filter action="drop" type="wildcard" pattern="*/single*"/>
23+
<filter action="drop" type="wildcard" pattern="*/_static/*" />
24+
<filter action="drop" type="wildcard" pattern="*/_images/*" />
25+
<filter action="drop" type="wildcard" pattern="*/search/" />
26+
</site>

0 commit comments

Comments
 (0)