Compare commits

...

7 Commits

Author SHA1 Message Date
183cdcfb83 Added internal flag to docs
All checks were successful
gl/check check status: success (183cdcfb83162378eb79a8fe9285b668ef822251)
gl/gate gate status: success (183cdcfb83162378eb79a8fe9285b668ef822251)
2024-06-20 07:11:07 +00:00
e99a11b843 fix repo name
All checks were successful
gl/check check status: success (e99a11b8431581383981beb1b898363ab8277971)
2024-06-19 12:51:46 +00:00
b3b2b543b4 Add LTS service
Some checks are pending
gl/check check status: pending (b3b2b543b4a1f9a4d44312d76c0ec98cea78ef9c)
2024-06-19 12:49:08 +00:00
e97a327999 Add environment filter to services_by_category
Reviewed-by: Hasko, Vladimir <vladimir.hasko@t-systems.com>
Co-authored-by: Gode, Sebastian <sebastian.gode@t-systems.com>
Co-committed-by: Gode, Sebastian <sebastian.gode@t-systems.com>
2024-05-29 10:58:48 +00:00
c5736b6886 Increase otcdocstheme public version requirement
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>
2024-01-29 10:24:09 +00:00
c6be426256 fix zuul.yaml.j2 template
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>
2024-01-18 13:19:53 +00:00
78c1a0b0e2 Update zuul.yaml.j2
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>
2024-01-18 09:19:22 +00:00
7 changed files with 69 additions and 2 deletions

View File

@ -0,0 +1,10 @@
---
environment: internal
hc_location: api/lts
html_location: docs/lts/api-ref
link: /log-tank-service/api-ref/
pdf_name: lts-api-ref
rst_location: api-ref/source
service_type: lts
title: API Reference
type: api-ref

View File

@ -0,0 +1,10 @@
---
environment: internal
hc_location: usermanual/lts
html_location: docs/lts/umn
link: /log-tank-service/umn/
pdf_name: lts-umn
rst_location: umn/source
service_type: lts
title: User Guide
type: umn

View File

@ -0,0 +1,16 @@
---
environment: internal
repositories:
- environment: internal
repo: docs-swiss/log-tank-service
type: gitea
- environment: public
repo: opentelekomcloud-docs-swiss/log-tank-service
type: github
service_category: md
service_title: Log Tank Service
service_type: lts
service_uri: log-tank-service
teams:
- name: docs-orchestration-rw
permission: write

View File

@ -87,10 +87,13 @@ class Services(object):
res.append(copy.deepcopy(cat)) res.append(copy.deepcopy(cat))
return res return res
def services_by_category(self, category): def services_by_category(self, category, environment=None):
"""List services matching category""" """List services matching category"""
res = [] res = []
for srv in self.all_services: for srv in self.all_services:
if environment:
if "environment" in srv and srv["environment"] != environment:
continue
if srv["service_category"] == category: if srv["service_category"] == category:
res.append(copy.deepcopy(srv)) res.append(copy.deepcopy(srv))
return res return res

View File

@ -1,6 +1,6 @@
sphinx>=2.0.0,!=2.1.0 # BSD sphinx>=2.0.0,!=2.1.0 # BSD
{% if target_environment == 'public' %} {% if target_environment == 'public' %}
otcdocstheme<1.0.0 # Apache-2.0 otcdocstheme<2.0.0 # Apache-2.0
{% elif target_environment == 'internal' %} {% elif target_environment == 'internal' %}
otcdocstheme # Apache-2.0 otcdocstheme # Apache-2.0
{% else %} {% else %}

View File

@ -0,0 +1,12 @@
---
- project:
merge-mode: squash-merge
default-branch: main
templates:
- helpcenter-swiss-base-jobs
check:
jobs:
- noop
gate:
jobs:
- noop

View File

@ -50,6 +50,7 @@ def process_repositories(args, service):
) )
conf_py_template = env.get_template("conf.py.j2") conf_py_template = env.get_template("conf.py.j2")
tox_ini_template = env.get_template("tox.ini.j2") tox_ini_template = env.get_template("tox.ini.j2")
zuul_yaml_template = env.get_template("zuul.yaml.j2")
index_sbv_template = env.get_template("index_sbv.rst.j2") index_sbv_template = env.get_template("index_sbv.rst.j2")
doc_requirements_template = env.get_template("doc_requirements.txt.j2") doc_requirements_template = env.get_template("doc_requirements.txt.j2")
@ -269,6 +270,16 @@ def process_repositories(args, service):
out.write(doc_requirements_content) out.write(doc_requirements_content)
repo_to.index.add(["doc/requirements.txt"]) repo_to.index.add(["doc/requirements.txt"])
if args.update_zuul:
"""Update zuul.yaml"""
zuul_yaml_content = zuul_yaml_template.render(**context)
zuul_yaml_path = pathlib.Path(copy_to, "zuul.yaml")
with open(zuul_yaml_path, "w", encoding="utf-8", newline="") as out:
logging.debug(f"Generating {zuul_yaml_path} from template...")
out.write(zuul_yaml_content)
repo_to.index.add(["zuul.yaml"])
if len(repo_to.index.diff("HEAD")) == 0: if len(repo_to.index.diff("HEAD")) == 0:
# Nothing to commit # Nothing to commit
logging.debug( logging.debug(
@ -354,6 +365,11 @@ def main():
action="store_true", action="store_true",
help="Whether to update service-based-view" help="Whether to update service-based-view"
) )
parser.add_argument(
"--update-zuul",
action="store_true",
help="Whether to update zuul.yaml"
)
parser.add_argument( parser.add_argument(
"--overwrite-index-sbv", "--overwrite-index-sbv",
action="store_true", action="store_true",