Fix swiss confpy

This commit is contained in:
Gode, Sebastian 2025-04-15 10:00:37 +00:00
parent 9c9d7ed695
commit 177e5deddc
3 changed files with 13 additions and 2 deletions

View File

@ -47,7 +47,8 @@ otcdocs_doc_type = '{{ doc_type }}'
otcdocs_service_category = '{{ service_category }}' 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_de' otcdocs_search_environment = '{{ otcdocs_search_environment }}'
otcdocs_search_index = '{{ otcdocs_search_index }}'
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

@ -64,9 +64,11 @@ commands =
wget -O {toxinidir}/_templates/longtable.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/longtable.tex.jinja wget -O {toxinidir}/_templates/longtable.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/longtable.tex.jinja
wget -O {toxinidir}/_templates/tabular.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabular.tex.jinja wget -O {toxinidir}/_templates/tabular.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabular.tex.jinja
wget -O {toxinidir}/_templates/tabulary.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabulary.tex.jinja wget -O {toxinidir}/_templates/tabulary.tex.jinja https://gitea.eco.tsi-dev.otc-service.com/infra/docs-templates/raw/branch/main/templates/tabulary.tex.jinja
{%- for doc in docs %}
{%- if doc.pdf_enabled %} {%- if doc.pdf_enabled %}
{[testenv:{{ doc.type }}-pdf-docs]commands} {[testenv:{{ doc.type }}-pdf-docs]commands}
{%- endif %} {%- endif %}
{%- endfor %}
{% endif %} {% endif %}
{% for doc in docs -%} {% for doc in docs -%}

View File

@ -174,10 +174,14 @@ def process_repositories(args, service):
context["html_options"] = dict( context["html_options"] = dict(
logo_url="https://docs.sc.otc.t-systems.com", logo_url="https://docs.sc.otc.t-systems.com",
) )
context["otcdocs_search_environment"] = "hc_swiss"
context["otcdocs_search_index"] = "search_index_swiss"
elif (args.target_environment == "public"): elif (args.target_environment == "public"):
context["html_options"] = dict( context["html_options"] = dict(
logo_url="https://docs.otc.t-systems.com", logo_url="https://docs.otc.t-systems.com",
) )
context["otcdocs_search_environment"] = "hc_de"
context["otcdocs_search_index"] = "search_index_de"
elif (args.target_environment == "internal" elif (args.target_environment == "internal"
and args.cloud_environment == "swiss"): and args.cloud_environment == "swiss"):
context["html_options"] = dict( context["html_options"] = dict(
@ -185,12 +189,16 @@ def process_repositories(args, service):
site_name="Internal Documentation Portal", site_name="Internal Documentation Portal",
logo_url="https://docs-swiss-int.otc-service.com", logo_url="https://docs-swiss-int.otc-service.com",
) )
context["otcdocs_search_environment"] = "hc_swiss"
context["otcdocs_search_index"] = "search_index_swiss"
elif args.target_environment == "internal": elif args.target_environment == "internal":
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.otc-service.com",
) )
context["otcdocs_search_environment"] = "hc_de"
context["otcdocs_search_index"] = "search_index_de"
context["doc_environment"] = args.target_environment context["doc_environment"] = args.target_environment
if doc['link']: if doc['link']:
context["doc_link"] = doc['link'] context["doc_link"] = doc['link']
@ -295,8 +303,8 @@ def process_repositories(args, service):
if cloud_environment["name"] == args.cloud_environment: if cloud_environment["name"] == args.cloud_environment:
if doc["type"] == "dev": if doc["type"] == "dev":
doc["type"] = "dev-guide" doc["type"] = "dev-guide"
doc["pdf_enabled"] = cloud_environment["pdf_enabled"]
context["docs"].append(doc) context["docs"].append(doc)
context["pdf_enabled"] = cloud_environment["pdf_enabled"]
context["target_environment"] = args.target_environment context["target_environment"] = args.target_environment
context["service_type"] = service['service_type'] context["service_type"] = service['service_type']