Compare commits

...

4 Commits

Author SHA1 Message Date
284535a4cf change site name
All checks were successful
gl/check check status: success (284535a4cf7a24983864504f84ebf27f0f51d2bb)
gl/gate gate status: success (284535a4cf7a24983864504f84ebf27f0f51d2bb)
2023-09-06 07:35:06 +00:00
6872b75aec remove slash from url
All checks were successful
gl/check check status: success (6872b75aec8897def7fa4b2b7818a0067743cfa7)
2023-08-21 13:26:45 +00:00
bba796a824 change the base_url accordingly
All checks were successful
gl/check check status: success (bba796a8246f1fc1b11728a5c090743983f49b3b)
2023-08-21 12:53:03 +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

View File

@ -148,8 +148,30 @@ def process_repositories(args, service):
context["html_options"] = dict(
disable_search=True,
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)
with open(conf_py_path, "w", encoding="utf-8", newline="") as out:
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",
service_type=service["service_type"]
)
context["service_category"] = service['service_category']
context["service_title"] = service['service_title']
if not copy_path.exists():
logging.info("Path for sbv does not exist")
copy_path.mkdir(parents=True, exist_ok=True)
@ -179,7 +203,12 @@ def process_repositories(args, service):
context["html_options"] = dict(
disable_search=True,
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="Open Telekom Cloud Swiss Documentation Portal",
logo_url="https://docs-beta.sc.otc.t-systems.com",
)
sbv_title = (service["service_title"] + "\n"
+ ('=' * len(service["service_title"])))
@ -248,7 +277,7 @@ def process_repositories(args, service):
args.commit_description
)
push_args = ["--set-upstream", "origin", branch_name]
if args.branch_force:
if args.force_push:
push_args.append("--force")
repo_to.git.push(*push_args)
if "github" in url_to:
@ -328,6 +357,11 @@ def main():
help=("Whether to overwrite index.rst for service-based-view."
+ "\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(
"--commit-description",
default=(