Compare commits

..

7 Commits

Author SHA1 Message Date
52424fd2f0 correct swiss portal name
All checks were successful
gl/check check status: success (52424fd2f0d6e2213722495c17c03594ed030a40)
gl/gate gate status: success (52424fd2f0d6e2213722495c17c03594ed030a40)
2023-09-06 12:08:08 +00:00
ca8c5fb34c change the base_url accordingly
Reviewed-by: Gode, Sebastian <sebastian.gode@t-systems.com>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2023-09-06 07:42:07 +00:00
a6a001cdba Changed Search Index
Reviewed-by: tischrei <tino.schreiber@t-systems.com>
Co-authored-by: Gode, Sebastian <sebastian.gode@t-systems.com>
Co-committed-by: Gode, Sebastian <sebastian.gode@t-systems.com>
2023-08-29 07:25:42 +00:00
7b319ca858 revert 9bb3ef92a5
Reviewed-by: Gode, Sebastian <sebastian.gode@t-systems.com>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2023-08-21 12:56:38 +00:00
9bb3ef92a5 Change logo_url for Swiss Cloud
Reviewed-by: Gode, Sebastian <sebastian.gode@t-systems.com>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2023-08-21 12:38:32 +00:00
898c1aafc2 fixing tool generate doc confpy to read additional metadata
Reviewed-by: vladimirhasko <vladimirhasko@gmail.com>
Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
2023-08-16 23:04:21 +00:00
d8ed8a0ba4 fixing various different issues
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
2023-08-16 16:06:46 +00:00
2 changed files with 38 additions and 3 deletions

View File

@ -46,6 +46,7 @@ otcdocs_service_category = '{{ service_category }}'
otcdocs_service_title = '{{ service_title }}' otcdocs_service_title = '{{ service_title }}'
otcdocs_service_type = '{{ service_type }}' otcdocs_service_type = '{{ service_type }}'
otcdocs_search_environment = 'hc_swiss' otcdocs_search_environment = 'hc_swiss'
otcdocs_search_index = 'search_index_swiss'
otcdocs_search_url = "https://opensearch.eco.tsi-dev.otc-service.com/" otcdocs_search_url = "https://opensearch.eco.tsi-dev.otc-service.com/"
# If extensions (or modules to document with autodoc) are in another directory, # If extensions (or modules to document with autodoc) are in another directory,

View File

@ -148,8 +148,30 @@ def process_repositories(args, service):
context["html_options"] = dict( context["html_options"] = dict(
disable_search=True, disable_search=True,
site_name="Internal Documentation Portal", site_name="Internal Documentation Portal",
logo_url="https://docs-int.otc-service.com", logo_url="https://docs-int.sc.otc.t-systems.com",
) )
else:
context["html_options"] = dict(
site_name="Swiss Open Telekom Cloud Docs",
logo_url="https://docs-beta.sc.otc.t-systems.com",
)
context["doc_environment"] = args.target_environment
if doc['link']:
context["doc_link"] = doc['link']
else:
context["doc_link"] = (
'/'
+ service['service_uri']
+ '/'
+ doc['type']
+ '/'
)
context["doc_title"] = doc['title']
context["doc_type"] = doc['type']
context["service_category"] = service['service_category']
context["service_title"] = service['service_title']
context["service_type"] = service['service_type']
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...")
@ -167,6 +189,8 @@ def process_repositories(args, service):
title=f"{service['service_title']} - Service Based View", title=f"{service['service_title']} - Service Based View",
service_type=service["service_type"] service_type=service["service_type"]
) )
context["service_category"] = service['service_category']
context["service_title"] = service['service_title']
if not copy_path.exists(): if not copy_path.exists():
logging.info("Path for sbv does not exist") logging.info("Path for sbv does not exist")
copy_path.mkdir(parents=True, exist_ok=True) copy_path.mkdir(parents=True, exist_ok=True)
@ -179,7 +203,12 @@ def process_repositories(args, service):
context["html_options"] = dict( context["html_options"] = dict(
disable_search=True, disable_search=True,
site_name="Internal Documentation Portal", site_name="Internal Documentation Portal",
logo_url="https://docs-int.otc-service.com", logo_url="https://docs-int.sc.otc.t-systems.com",
)
else:
context["html_options"] = dict(
site_name="Swiss Open Telekom Cloud Docs",
logo_url="https://docs-beta.sc.otc.t-systems.com",
) )
sbv_title = (service["service_title"] + "\n" sbv_title = (service["service_title"] + "\n"
+ ('=' * len(service["service_title"]))) + ('=' * len(service["service_title"])))
@ -248,7 +277,7 @@ def process_repositories(args, service):
args.commit_description args.commit_description
) )
push_args = ["--set-upstream", "origin", branch_name] push_args = ["--set-upstream", "origin", branch_name]
if args.branch_force: if args.force_push:
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:
@ -328,6 +357,11 @@ def main():
help=("Whether to overwrite index.rst for service-based-view." help=("Whether to overwrite index.rst for service-based-view."
+ "\nCan only be used if --update-sbv is also specified") + "\nCan only be used if --update-sbv is also specified")
) )
parser.add_argument(
"--force-push",
action="store_true",
help="Whether to force push the commit"
)
parser.add_argument( parser.add_argument(
"--commit-description", "--commit-description",
default=( default=(