Compare commits

..

1 Commits

Author SHA1 Message Date
29ff90ae7b add PLAS title
All checks were successful
gl/check check status: success (29ff90ae7ba203879de1fa15345b7631628c7728)
2023-02-20 14:15:43 +00:00
5 changed files with 6 additions and 75 deletions

View File

@ -293,24 +293,6 @@ documents:
service_type: dis
title: User Guide
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
html_location: docs/dms/api-ref
link: /distributed-message-service/api-ref/
@ -691,18 +673,10 @@ documents:
html_location: docs/obs/pfs
link: /object-storage-service/parallel-file-system/
pdf_name: obs-pfs
rst_location: doc/parallel-file-system/source
rst_location: doc/pfs/source
service_type: obs
title: Parallel File System (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
type: pfs
- hc_location: api_swift/obs
html_location: docs/obs/api-swift
link: /object-storage-service/swiftapi/
@ -1095,7 +1069,7 @@ services:
repo: opentelekomcloud-docs/cloud-container-engine
type: github
service_category: container
service_title: Cloud Container Engine
service_title: Cloud Container Service
service_type: cce
teams:
- name: docs-container-rw
@ -1269,19 +1243,6 @@ services:
teams:
- name: docs-network-rw
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:
- environment: internal
repo: docs/data-replication-service

View File

@ -209,22 +209,3 @@ class Services(object):
doc_struct[srv["service_category"]].append(srv_res)
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}
{%- endfor %}
[testenv:pdf-docs]
[testenv:docs-pdf]
deps = -r{toxinidir}/doc/requirements.txt
allowlist_externals =
rm

View File

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

View File

@ -130,7 +130,6 @@ def process_repositories(args, service):
zuul_templates = None
zuul_jobs = dict()
zuul_new_jobs = list()
zuul_vars = dict()
zuul_config_updated = False
for item in zuul_config:
if "project" in item.keys():
@ -138,11 +137,10 @@ def process_repositories(args, service):
zuul_templates = project.setdefault("templates", [])
if not zuul_templates:
zuul_templates = []
zuul_vars = project.setdefault("vars", {})
elif "job" in item.keys():
job = item["job"]
zuul_jobs[job["name"]] = job
logging.debug(f"Existing jobs {zuul_jobs}")
print(f"Existing jobs {zuul_jobs}")
if "helpcenter-base-jobs" not in zuul_templates:
zuul_templates.append("helpcenter-base-jobs")
zuul_config_updated = True
@ -150,7 +148,6 @@ def process_repositories(args, service):
job_suffix = (
"-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"]):
logging.debug(f"Analyzing document {doc}")
if not doc.get("type"):
@ -159,12 +156,6 @@ def process_repositories(args, service):
doc_type = "dev-guide"
else:
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}"
if doc_type in ["api-ref", "umn", "dev-guide"]:
if template_name not in zuul_templates:
@ -199,7 +190,6 @@ def process_repositories(args, service):
if "project" in item.keys():
project = item["project"]
project["templates"] = zuul_templates
project["vars"] = zuul_vars
# Ensure new jobs are in check
if len(zuul_new_jobs) > 0:
project.setdefault(