Compare commits

..

11 Commits

Author SHA1 Message Date
03ecab9755 Rename tox target for pdf build
All checks were successful
gl/check check status: success (03ecab9755562d7f4efc3c3b914b787c73a48eb8)
zuul jobs require target to be called pdf-docs instead of docs-pdf
2023-03-23 12:37:25 +01:00
ec59663c39 Include pdf filenames into zuul config
Zuul jobs expect to know PDF filenames to be fetching from artifacts.
Best way is to include them into the project config while managing zuul
config.
2023-03-23 12:37:25 +01:00
b52b0bb5e0 Change html_link for PFS and Perms Guide
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2023-03-13 14:42:24 +00:00
ccfbd0c235 dli_repo
Reviewed-by: Gode, Sebastian <sebastian.gode@telekom.de>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2023-03-10 12:43:56 +00:00
28baf2213e Update 'tools-requirements.txt'
Reviewed-by: gtema <artem.goncharov@gmail.com>
Co-authored-by: Gode, Sebastian <sebastian.gode@telekom.de>
Co-committed-by: Gode, Sebastian <sebastian.gode@telekom.de>
2023-03-10 11:39:44 +00:00
6779395a19 pfs_folder_fix
Reviewed-by: Gode, Sebastian <sebastian.gode@telekom.de>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2023-03-08 11:47:21 +00:00
4e34a4fa80 adding new documentation type for OBS
Reviewed-by: tischrei <tino.schreiber@t-systems.com>
Co-authored-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-committed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
2023-02-22 08:56:11 +00:00
c037ca9a53 Fixed spelling of MapReduce Service
Reviewed-by: tischrei <tino.schreiber@t-systems.com>
Co-authored-by: Gode, Sebastian <sebastian.gode@telekom.de>
Co-committed-by: Gode, Sebastian <sebastian.gode@telekom.de>
2023-02-21 10:46:34 +00:00
8de5c8ba57 add get_service_with_docs_by_service_type()
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2023-02-21 10:44:51 +00:00
e06e27d0e0 add PLAS title
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2023-02-21 08:41:44 +00:00
148e88184e change Cloud Container Service to Engine
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: tischrei <tino.schreiber@t-systems.com>
Co-committed-by: tischrei <tino.schreiber@t-systems.com>
2023-02-21 07:21:58 +00:00
5 changed files with 75 additions and 6 deletions

View File

@ -293,6 +293,24 @@ documents:
service_type: dis service_type: dis
title: User Guide title: User Guide
type: umn type: umn
- environment: internal
hc_location: api/dli
html_location: docs/dli/api-ref
link: /data-lake-insight/api-ref/
pdf_name: dli-api-ref
rst_location: api-ref/source
service_type: dli
title: API Reference
type: api-ref
- environment: internal
hc_location: usermanual/dli
html_location: docs/dli/umn
link: /data-lake-insight/umn/
pdf_name: dli-umn
rst_location: umn/source
service_type: dli
title: User Guide
type: umn
- hc_location: api/dms - hc_location: api/dms
html_location: docs/dms/api-ref html_location: docs/dms/api-ref
link: /distributed-message-service/api-ref/ link: /distributed-message-service/api-ref/
@ -673,10 +691,18 @@ documents:
html_location: docs/obs/pfs html_location: docs/obs/pfs
link: /object-storage-service/parallel-file-system/ link: /object-storage-service/parallel-file-system/
pdf_name: obs-pfs pdf_name: obs-pfs
rst_location: doc/pfs/source rst_location: doc/parallel-file-system/source
service_type: obs service_type: obs
title: Parallel File System (PFS) title: Parallel File System (PFS)
type: pfs type: parallel-file-system
- environment: internal
html_location: docs/obs/perms-cfg
link: /object-storage-service/permissions-configuration-guide/
pdf_name: obs-perms-cfg
rst_location: doc/permissions-configuration-guide/source
service_type: obs
title: Permissions Configuration Guide
type: permissions-configuration-guide
- hc_location: api_swift/obs - hc_location: api_swift/obs
html_location: docs/obs/api-swift html_location: docs/obs/api-swift
link: /object-storage-service/swiftapi/ link: /object-storage-service/swiftapi/
@ -1069,7 +1095,7 @@ services:
repo: opentelekomcloud-docs/cloud-container-engine repo: opentelekomcloud-docs/cloud-container-engine
type: github type: github
service_category: container service_category: container
service_title: Cloud Container Service service_title: Cloud Container Engine
service_type: cce service_type: cce
teams: teams:
- name: docs-container-rw - name: docs-container-rw
@ -1243,6 +1269,19 @@ services:
teams: teams:
- name: docs-network-rw - name: docs-network-rw
permission: write permission: write
- repositories:
- environment: internal
repo: docs/data-lake-insight
type: gitea
- environment: public
repo: docs/data-lake-insight
type: github
service_category: big_data
service_title: Data Lake Insight
service_type: dli
teams:
- name: docs-bigdata-ai-rw
permission: write
- repositories: - repositories:
- environment: internal - environment: internal
repo: docs/data-replication-service repo: docs/data-replication-service
@ -1440,7 +1479,7 @@ services:
repo: opentelekomcloud-docs/mapreduce-service repo: opentelekomcloud-docs/mapreduce-service
type: github type: github
service_category: big_data service_category: big_data
service_title: Map Reduce Service service_title: MapReduce Service
service_type: mrs service_type: mrs
teams: teams:
- name: docs-bigdata-ai-rw - name: docs-bigdata-ai-rw

View File

@ -209,3 +209,22 @@ class Services(object):
doc_struct[srv["service_category"]].append(srv_res) doc_struct[srv["service_category"]].append(srv_res)
return dict(categories=doc_struct) return dict(categories=doc_struct)
def get_service_with_docs_by_service_type(self, service_type):
"""Retrieve service and service docs by service_type
:param str service_type: Filter by service_type
"""
res = dict()
res['service'] = {}
docs = []
services = self._service_data
for doc in services['documents']:
if doc['service_type'] == service_type:
docs.append(doc)
res['documents'] = docs
for service in services['services']:
if service['service_type'] == service_type:
res['service'] = service
break
return res

View File

@ -35,7 +35,7 @@ commands =
{[testenv:json-{{ doc.type }}]commands} {[testenv:json-{{ doc.type }}]commands}
{%- endfor %} {%- endfor %}
[testenv:docs-pdf] [testenv:pdf-docs]
deps = -r{toxinidir}/doc/requirements.txt deps = -r{toxinidir}/doc/requirements.txt
allowlist_externals = allowlist_externals =
rm rm

View File

@ -3,3 +3,4 @@ ruamel.yaml
requests requests
jinja2 jinja2
dirsync dirsync
cookiecutter

View File

@ -130,6 +130,7 @@ def process_repositories(args, service):
zuul_templates = None zuul_templates = None
zuul_jobs = dict() zuul_jobs = dict()
zuul_new_jobs = list() zuul_new_jobs = list()
zuul_vars = dict()
zuul_config_updated = False zuul_config_updated = False
for item in zuul_config: for item in zuul_config:
if "project" in item.keys(): if "project" in item.keys():
@ -137,10 +138,11 @@ def process_repositories(args, service):
zuul_templates = project.setdefault("templates", []) zuul_templates = project.setdefault("templates", [])
if not zuul_templates: if not zuul_templates:
zuul_templates = [] zuul_templates = []
zuul_vars = project.setdefault("vars", {})
elif "job" in item.keys(): elif "job" in item.keys():
job = item["job"] job = item["job"]
zuul_jobs[job["name"]] = job zuul_jobs[job["name"]] = job
print(f"Existing jobs {zuul_jobs}") logging.debug(f"Existing jobs {zuul_jobs}")
if "helpcenter-base-jobs" not in zuul_templates: if "helpcenter-base-jobs" not in zuul_templates:
zuul_templates.append("helpcenter-base-jobs") zuul_templates.append("helpcenter-base-jobs")
zuul_config_updated = True zuul_config_updated = True
@ -148,6 +150,7 @@ def process_repositories(args, service):
job_suffix = ( job_suffix = (
"-hc-int-jobs" if args.environment == "internal" else "-hc-jobs" "-hc-int-jobs" if args.environment == "internal" else "-hc-jobs"
) )
sphinx_pdf_files = zuul_vars.setdefault('sphinx_pdf_files', [])
for doc in data.docs_by_service_type(service["service_type"]): for doc in data.docs_by_service_type(service["service_type"]):
logging.debug(f"Analyzing document {doc}") logging.debug(f"Analyzing document {doc}")
if not doc.get("type"): if not doc.get("type"):
@ -156,6 +159,12 @@ def process_repositories(args, service):
doc_type = "dev-guide" doc_type = "dev-guide"
else: else:
doc_type = doc["type"] doc_type = doc["type"]
# Collect all PDF files into sphinx_pdf_files var
pdf_name = doc.get('pdf_name')
if pdf_name and f"{pdf_name}.pdf" not in sphinx_pdf_files:
sphinx_pdf_files.append(f"{pdf_name}.pdf")
zuul_config_updated = True
template_name = f"{doc_type}{job_suffix}" template_name = f"{doc_type}{job_suffix}"
if doc_type in ["api-ref", "umn", "dev-guide"]: if doc_type in ["api-ref", "umn", "dev-guide"]:
if template_name not in zuul_templates: if template_name not in zuul_templates:
@ -190,6 +199,7 @@ def process_repositories(args, service):
if "project" in item.keys(): if "project" in item.keys():
project = item["project"] project = item["project"]
project["templates"] = zuul_templates project["templates"] = zuul_templates
project["vars"] = zuul_vars
# Ensure new jobs are in check # Ensure new jobs are in check
if len(zuul_new_jobs) > 0: if len(zuul_new_jobs) > 0:
project.setdefault( project.setdefault(