forked from infra/otc-metadata
Added search index params on confpy
This commit is contained in:
parent
c6f3bc7e0c
commit
22594ecced
@ -37,6 +37,15 @@ otcdocs_git_fqdn = '{{ git_fqdn }}'
|
|||||||
otcdocs_git_type = '{{ git_type }}'
|
otcdocs_git_type = '{{ git_type }}'
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
|
# Those variables are needed for indexing into OpenSearch
|
||||||
|
otcdocs_doc_environment = '{{ doc_environment }}'
|
||||||
|
otcdocs_doc_link = '{{ doc_link }}'
|
||||||
|
otcdocs_doc_title = '{{ doc_title }}'
|
||||||
|
otcdocs_doc_type = '{{ doc_type }}'
|
||||||
|
otcdocs_service_title = '{{ service_title }}'
|
||||||
|
otcdocs_service_type = '{{ service_type }}'
|
||||||
|
otcdocs_service_category = '{{ service_category }}'
|
||||||
|
|
||||||
# If extensions (or modules to document with autodoc) are in another directory,
|
# If extensions (or modules to document with autodoc) are in another directory,
|
||||||
# add these directories to sys.path here. If the directory is relative to the
|
# add these directories to sys.path here. If the directory is relative to the
|
||||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||||
|
@ -150,6 +150,14 @@ def process_repositories(args, service):
|
|||||||
site_name="Internal Documentation Portal",
|
site_name="Internal Documentation Portal",
|
||||||
logo_url="https://docs-int.otc-service.com",
|
logo_url="https://docs-int.otc-service.com",
|
||||||
)
|
)
|
||||||
|
context["doc_environment"] = args.target_environment
|
||||||
|
context["doc_link"] = doc['link']
|
||||||
|
context["doc_title"] = doc['title']
|
||||||
|
context["doc_type"] = doc['type']
|
||||||
|
context["service_title"] = service['service_title']
|
||||||
|
context["service_type"] = service['service_type']
|
||||||
|
context["service_category"] = service['service_category']
|
||||||
|
|
||||||
conf_py_content = conf_py_template.render(**context)
|
conf_py_content = conf_py_template.render(**context)
|
||||||
with open(conf_py_path, "w", encoding="utf-8", newline="") as out:
|
with open(conf_py_path, "w", encoding="utf-8", newline="") as out:
|
||||||
logging.debug(f"Generating {conf_py_path} from template...")
|
logging.debug(f"Generating {conf_py_path} from template...")
|
||||||
@ -251,7 +259,7 @@ def process_repositories(args, service):
|
|||||||
if args.branch_force:
|
if args.branch_force:
|
||||||
push_args.append("--force")
|
push_args.append("--force")
|
||||||
repo_to.git.push(*push_args)
|
repo_to.git.push(*push_args)
|
||||||
if "github" in url_to:
|
if "github" in url_to and args.open_gh_pr:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
args=["gh", "pr", "create", "-f"], cwd=copy_to, check=False
|
args=["gh", "pr", "create", "-f"], cwd=copy_to, check=False
|
||||||
)
|
)
|
||||||
@ -337,6 +345,11 @@ def main():
|
|||||||
),
|
),
|
||||||
help="Commit description for the commit",
|
help="Commit description for the commit",
|
||||||
)
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--open-gh-pr",
|
||||||
|
action="store_true",
|
||||||
|
help="Whether to open a PR on GitHub"
|
||||||
|
)
|
||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user