From 7821fdbd243a7700e31867b7759befd1a896255e Mon Sep 17 00:00:00 2001 From: gtema Date: Wed, 19 Oct 2022 12:57:39 +0000 Subject: [PATCH] Add job for comparing doc content to the current Reviewed-by: Hasko, Vladimir Co-authored-by: gtema Co-committed-by: gtema --- metadata.yaml | 113 ++++++++++++++++++++++++++++++ otc_doc_convertor/comparator.py | 78 +++++++++++++++++++++ playbooks/compare.yaml | 30 ++++++++ requirements.txt | 1 + roles/compare/tasks/main.yaml | 5 ++ roles/convert_doc/tasks/main.yaml | 1 - setup.cfg | 1 + zuul.yaml | 35 ++++++--- 8 files changed, 254 insertions(+), 10 deletions(-) create mode 100644 otc_doc_convertor/comparator.py create mode 100644 playbooks/compare.yaml create mode 100644 roles/compare/tasks/main.yaml diff --git a/metadata.yaml b/metadata.yaml index 0d22bc28..67bde902 100644 --- a/metadata.yaml +++ b/metadata.yaml @@ -9,11 +9,13 @@ categories: title: API Reference type: api-ref pdf_name: antiddos-api-ref + hc_location: api/antiddos - html_location: docs/antiddos/umn rst_location: umn/source title: User Guide type: umn pdf_name: antiddos-umn + hc_location: usermanual/antiddos teams: - name: docs-security-services-rw permission: write @@ -26,11 +28,13 @@ categories: title: API Reference type: api-ref pdf_name: iam-api-ref + hc_location: api/iam - html_location: docs/iam/umn rst_location: umn/source title: User Guide type: umn pdf_name: iam-umn + hc_location: usermanual/iam teams: - name: docs-security-services-rw permission: write @@ -43,11 +47,13 @@ categories: title: API Reference type: api-ref pdf_name: kms-api-ref + hc_location: api/kms - html_location: docs/kms/umn rst_location: umn/source title: User Guide type: umn pdf_name: kms-umn + hc_location: usermanual/kms teams: - name: docs-security-services-rw permission: write @@ -60,11 +66,13 @@ categories: title: API Reference type: api-ref pdf_name: waf-api-ref + hc_location: api/waf - html_location: docs/waf/umn rst_location: umn/source title: User Guide type: umn pdf_name: waf-umn + hc_location: usermanual/waf teams: - name: docs-security-services-rw permission: write @@ -77,11 +85,13 @@ categories: title: API Reference type: api-ref pdf_name: wafd-api-ref + hc_location: api/wafd - html_location: docs/wafd/umn rst_location: umn/source title: User Guide type: umn pdf_name: wafd-umn + hc_location: usermanual/wafd teams: - name: docs-security-services-rw permission: write @@ -95,11 +105,13 @@ categories: title: API Reference type: api-ref pdf_name: aom-api-ref + hc_location: api/aom - html_location: docs/aom/umn rst_location: umn/source title: User Guide type: umn pdf_name: aom-umn + hc_location: usermanual/aom teams: - name: docs-orchestration-rw permission: write @@ -112,16 +124,19 @@ categories: title: API Reference type: api-ref pdf_name: dms-api-ref + hc_location: api/dms - html_location: docs/dms/dev rst_location: dev_guide/source title: Developer Guide type: dev pdf_name: dms-dev-guide + hc_location: devg/dms - html_location: docs/dms/umn rst_location: umn/source title: User Guide type: umn pdf_name: dms-umn + hc_location: usermanual/dms teams: - name: docs-orchestration-rw permission: write @@ -134,11 +149,13 @@ categories: title: API Reference type: api-ref pdf_name: smn-api-ref + hc_location: api/smn - html_location: docs/smn/umn rst_location: umn/source title: User Guide type: umn pdf_name: smn-umn + hc_location: usermanual/smn teams: - name: docs-orchestration-rw permission: write @@ -152,16 +169,19 @@ categories: title: API Reference type: api-ref pdf_name: as-api-ref + hc_location: api/as - html_location: docs/as/dev rst_location: dev_guide/source title: Developer Guide type: dev pdf_name: as-dev-guide + hc_location: devg/as - html_location: docs/as/umn rst_location: umn/source title: User Guide type: umn pdf_name: as-umn + hc_location: usermanual/as teams: - name: docs-compute-rw permission: write @@ -174,21 +194,25 @@ categories: title: API Reference type: api-ref pdf_name: bms-api-ref + hc_location: api/bms - html_location: docs/bms/dev rst_location: dev_guide/source title: Developer Guide type: dev pdf_name: bms-dev-guide + hc_location: devg/bms - html_location: docs/bms/image-creation-guide rst_location: docs/bms/image-creation-guide title: Private Image Creation Guide type: dummy pdf_name: bms-image-creation-guide + hc_location: bpicg/bms - html_location: docs/bms/umn rst_location: umn/source title: User Guide type: umn pdf_name: bms-umn + hc_location: usermanual/bms teams: - name: docs-compute-rw permission: write @@ -201,11 +225,13 @@ categories: title: API Reference type: api-ref pdf_name: deh-api-ref + hc_location: api/deh - html_location: docs/deh/umn rst_location: umn/source title: User Guide type: umn pdf_name: deh-umn + hc_location: usermanual/deh teams: - name: docs-compute-rw permission: write @@ -218,16 +244,19 @@ categories: title: API Reference type: api-ref pdf_name: ecs-api-ref + hc_location: api/ecs - html_location: docs/ecs/dev rst_location: dev_guide/source title: Developer Guide type: dev pdf_name: ecs-dev-guide + hc_location: devg/ecs - html_location: docs/ecs/umn rst_location: umn/source title: User Guide type: umn pdf_name: ecs-umn + hc_location: usermanual/ecs teams: - name: docs-compute-rw permission: write @@ -240,11 +269,13 @@ categories: title: API Reference type: api-ref pdf_name: ims-api-ref + hc_location: api/ims - html_location: docs/ims/dev rst_location: dev_guide/source title: Developer Guide type: dev pdf_name: ims-dev-guide + hc_location: devg/ims - html_location: docs/ims/public-images rst_location: docs/ims/public-images title: Public Image Introduction @@ -255,6 +286,7 @@ categories: title: User Guide type: umn pdf_name: ims-umn + hc_location: usermanual/ims teams: - name: docs-compute-rw permission: write @@ -268,11 +300,13 @@ categories: title: API Reference type: api-ref pdf_name: cbr-api-ref + hc_location: api/cbr - html_location: docs/cbr/umn rst_location: umn/source title: User Guide type: umn pdf_name: cbr-umn + hc_location: usermanual/cbr teams: - name: docs-storage-rw permission: write @@ -285,11 +319,13 @@ categories: title: API Reference type: api-ref pdf_name: csbs-api-ref + hc_location: api/csbs - html_location: docs/csbs/umn rst_location: umn/source title: User Guide type: umn pdf_name: csbs-umn + hc_location: usermanual/csbs teams: - name: docs-storage-rw permission: write @@ -302,16 +338,19 @@ categories: title: API Reference type: api-ref pdf_name: evs-api-ref + hc_location: api/evs - html_location: docs/evs/dev rst_location: dev_guide/source title: Developer Guide type: dev pdf_name: evs-dev-guide + hc_location: devg/evs - html_location: docs/evs/umn rst_location: umn/source title: User Guide type: umn pdf_name: evs-umn + hc_location: usermanual/evs teams: - name: docs-storage-rw permission: write @@ -324,26 +363,31 @@ categories: title: API Reference type: api-ref pdf_name: obs-api-ref + hc_location: api/obs - html_location: docs/obs/dev rst_location: dev_guide/source title: Developer Guide type: dev pdf_name: obs-dev-guide + hc_location: devg/obs - html_location: docs/obs/s3api rst_location: doc/s3api/source title: S3 API Reference type: dummy pdf_name: obs-s3api + hc_location: api_obs/obs - html_location: docs/obs/s3cmd rst_location: doc/s3cmd/source title: Third-Party Client (s3cmd) type: dummy pdf_name: obs-s3cmd + hc_location: ugs3cmd/obs - html_location: docs/obs/umn rst_location: umn/source title: User Guide type: umn pdf_name: obs-umn + hc_location: usermanual/obs teams: - name: docs-storage-rw permission: write @@ -356,11 +400,13 @@ categories: title: API Reference type: api-ref pdf_name: sdrs-api-ref + hc_location: api/sdrs - html_location: docs/sdrs/umn rst_location: umn/source title: User Guide type: umn pdf_name: sdrs-umn + hc_location: usermanual/sdrs teams: - name: docs-storage-rw permission: write @@ -373,16 +419,19 @@ categories: title: API Reference type: api-ref pdf_name: sfs-api-ref + hc_location: api/sfs - html_location: docs/sfs/cli rst_location: doc/cli/source title: Manila Client Reference type: dummy pdf_name: sfs-cli + hc_location: api_cli/sfs - html_location: docs/sfs/umn rst_location: umn/source title: User Guide type: umn pdf_name: sfs-umn + hc_location: usermanual/sfs teams: - name: docs-storage-rw permission: write @@ -395,11 +444,13 @@ categories: title: API Reference type: api-ref pdf_name: vbs-api-ref + hc_location: api/vbs - html_location: docs/vbs/umn rst_location: umn/source title: User Guide type: umn pdf_name: vbs-umn + hc_location: usermanual/vbs teams: - name: docs-storage-rw permission: write @@ -413,11 +464,13 @@ categories: title: API Reference type: api-ref pdf_name: cce-api-ref + hc_location: api/cce - html_location: docs/cce/umn rst_location: umn/source title: User Guide type: umn pdf_name: cce-umn + hc_location: usermanual/cce teams: - name: docs-container-rw permission: write @@ -430,11 +483,13 @@ categories: title: API Reference type: api-ref pdf_name: swr-api-ref + hc_location: api/swr - html_location: docs/swr/umn rst_location: umn/source title: User Guide type: umn pdf_name: swr-umn + hc_location: usermanual/swr teams: - name: docs-container-rw permission: write @@ -448,6 +503,7 @@ categories: title: User Guide type: umn pdf_name: cdn-umn + hc_location: usermanual/cdn teams: - name: docs-network-rw permission: write @@ -460,11 +516,13 @@ categories: title: API Reference type: api-ref pdf_name: dc-api-ref + hc_location: api/dc - html_location: docs/dc/umn rst_location: umn/source title: User Guide type: umn pdf_name: dc-umn + hc_location: usermanual/dc teams: - name: docs-network-rw permission: write @@ -477,11 +535,13 @@ categories: title: API Reference type: api-ref pdf_name: dns-api-ref + hc_location: api/dns - html_location: docs/dns/umn rst_location: umn/source title: User Guide type: umn pdf_name: dns-umn + hc_location: usermanual/dns teams: - name: docs-network-rw permission: write @@ -494,11 +554,13 @@ categories: title: API Reference type: api-ref pdf_name: eip-api-ref + hc_location: api/eip - html_location: docs/eip/umn rst_location: umn/source title: User Guide type: umn pdf_name: eip-umn + hc_location: usermanual/eip teams: - name: docs-network-rw permission: write @@ -511,11 +573,13 @@ categories: title: API Reference type: api-ref pdf_name: elb-api-ref + hc_location: api/elb - html_location: docs/elb/umn rst_location: umn/source title: User Guide type: umn pdf_name: elb-umn + hc_location: usermanual/elb teams: - name: docs-network-rw permission: write @@ -528,11 +592,13 @@ categories: title: API Reference type: api-ref pdf_name: natgw-api-ref + hc_location: api/natgw - html_location: docs/natgw/umn rst_location: umn/source title: User Guide type: umn pdf_name: natgw-umn + hc_location: usermanual/natgw teams: - name: docs-network-rw permission: write @@ -545,11 +611,13 @@ categories: title: API Reference type: api-ref pdf_name: plas-api-ref + hc_location: api/plas - html_location: docs/plas/umn rst_location: umn/source title: User Guide type: umn pdf_name: plas-umn + hc_location: usermanual/plas teams: - name: docs-network-rw permission: write @@ -562,11 +630,13 @@ categories: title: API Reference type: api-ref pdf_name: vpc-api-ref + hc_location: api/vpc - html_location: docs/vpc/umn rst_location: umn/source title: User Guide type: umn pdf_name: vpc-umn + hc_location: usermanual/vpc teams: - name: docs-network-rw permission: write @@ -579,11 +649,13 @@ categories: title: API Reference type: api-ref pdf_name: vpcep-api-ref + hc_location: api/vpcep - html_location: docs/vpcep/umn rst_location: umn/source title: User Guide type: umn pdf_name: vpcep-umn + hc_location: usermanual/vpcep teams: - name: docs-network-rw permission: write @@ -596,11 +668,13 @@ categories: title: API Reference type: api-ref pdf_name: vpn-api-ref + hc_location: api/vpn - html_location: docs/vpn/umn rst_location: umn/source title: User Guide type: umn pdf_name: vpn-umn + hc_location: usermanual/vpn teams: - name: docs-network-rw permission: write @@ -614,11 +688,13 @@ categories: title: API Reference type: api-ref pdf_name: ces-api-ref + hc_location: api/ces - html_location: docs/ces/umn rst_location: umn/source title: User Guide type: umn pdf_name: ces-umn + hc_location: usermanual/ces teams: - name: docs-orchestration-rw permission: write @@ -631,11 +707,13 @@ categories: title: API Reference type: api-ref pdf_name: cts-api-ref + hc_location: api/cts - html_location: docs/cts/umn rst_location: umn/source title: User Guide type: umn pdf_name: cts-umn + hc_location: usermanual/cts teams: - name: docs-orchestration-rw permission: write @@ -648,11 +726,13 @@ categories: title: API Reference type: api-ref pdf_name: lts-api-ref + hc_location: api/lts - html_location: docs/lts/umn rst_location: umn/source title: User Guide type: umn pdf_name: lts-umn + hc_location: usermanual/lts teams: - name: docs-orchestration-rw permission: write @@ -665,11 +745,13 @@ categories: title: API Reference type: api-ref pdf_name: rms-api-ref + hc_location: api/rms - html_location: docs/rms/umn rst_location: umn/source title: User Guide type: umn pdf_name: rms-umn + hc_location: usermanual/rms teams: - name: docs-orchestration-rw permission: write @@ -682,11 +764,13 @@ categories: title: API Reference type: api-ref pdf_name: rts-api-ref + hc_location: api/rts - html_location: docs/rts/umn rst_location: umn/source title: User Guide type: umn pdf_name: rts-umn + hc_location: usermanual/rts teams: - name: docs-orchestration-rw permission: write @@ -699,11 +783,13 @@ categories: title: API Reference type: api-ref pdf_name: tms-api-ref + hc_location: api/tms - html_location: docs/tms/umn rst_location: umn/source title: User Guide type: umn pdf_name: tms-umn + hc_location: usermanual/tms teams: - name: docs-orchestration-rw permission: write @@ -717,11 +803,13 @@ categories: title: API Reference type: api-ref pdf_name: css-api-ref + hc_location: api/css - html_location: docs/css/umn rst_location: umn/source title: User Guide type: umn pdf_name: css-umn + hc_location: usermanual/css teams: - name: docs-bigdata-ai-rw permission: write @@ -734,11 +822,13 @@ categories: title: API Reference type: api-ref pdf_name: dis-api-ref + hc_location: api/dis - html_location: docs/dis/umn rst_location: umn/source title: User Guide type: umn pdf_name: dis-umn + hc_location: usermanual/dis teams: - name: docs-bigdata-ai-rw permission: write @@ -751,21 +841,25 @@ categories: title: API Reference type: api-ref pdf_name: dws-api-ref + hc_location: api/dws - html_location: docs/dws/dev rst_location: dev_guide/source title: Developer Guide type: dev pdf_name: dws-dev-guide + hc_location: devg/dws - html_location: docs/dws/tool rst_location: doc/tool/source title: Tool Guide type: dummy pdf_name: dws-tool-guide + hc_location: tg/dws - html_location: docs/dws/umn rst_location: umn/source title: User Guide type: umn pdf_name: dws-umn + hc_location: usermanual/dws teams: - name: docs-bigdata-ai-rw permission: write @@ -778,11 +872,13 @@ categories: title: API Reference type: api-ref pdf_name: ma-api-ref + hc_location: api/ma - html_location: docs/modelarts/umn rst_location: umn/source title: User Guide type: umn pdf_name: ma-umn + hc_location: usermanual/ma teams: - name: docs-bigdata-ai-rw permission: write @@ -795,16 +891,19 @@ categories: title: API Reference type: api-ref pdf_name: mrs-api-ref + hc_location: api/mrs - html_location: docs/mrs/component-operation-guide rst_location: docs/mrs/component-operation-guide title: Component Operation Guide type: dummy pdf_name: mrs-component-operation-guide + hc_location: cmpntguide/mrs - html_location: docs/mrs/umn rst_location: umn/source title: User Guide type: umn pdf_name: mrs-umn + hc_location: usermanual/mrs teams: - name: docs-bigdata-ai-rw permission: write @@ -818,6 +917,7 @@ categories: title: User Guide type: umn pdf_name: das-umn + hc_location: usermanual/das teams: - name: docs-database-rw permission: write @@ -830,11 +930,13 @@ categories: title: API Reference type: api-ref pdf_name: dcs-api-ref + hc_location: api/dcs - html_location: docs/dcs/umn rst_location: umn/source title: User Guide type: umn pdf_name: dcs-umn + hc_location: usermanual/dcs teams: - name: docs-database-rw permission: write @@ -847,11 +949,13 @@ categories: title: API Reference type: api-ref pdf_name: dds-api-ref + hc_location: api/dds - html_location: docs/dds/umn rst_location: umn/source title: User Guide type: umn pdf_name: dds-umn + hc_location: usermanual/dds teams: - name: docs-database-rw permission: write @@ -864,6 +968,7 @@ categories: title: User Guide type: umn pdf_name: drs-umn + hc_location: usermanual/drs teams: - name: docs-database-rw permission: write @@ -877,11 +982,13 @@ categories: title: API Reference type: api-ref pdf_name: gaussdb_mysql-api-ref + hc_location: api/gaussdb_mysql - html_location: docs/gaussdb_mysql/umn rst_location: umn/source title: User Guide type: umn pdf_name: gaussdb_mysql-umn + hc_location: usermanual/gaussdb_mysql teams: - name: docs-database-rw permission: write @@ -894,6 +1001,7 @@ categories: title: User Guide type: umn pdf_name: gauss_nosql + hc_location: usermanual/gaussdb_nosql teams: - name: docs-database-rw permission: write @@ -907,11 +1015,13 @@ categories: title: API Reference type: api-ref pdf_name: opengauss-api-ref + hc_location: api/opengauss - html_location: docs/opengauss/umn rst_location: umn/source title: User Guide type: umn pdf_name: opengauss-umn + hc_location: usermanual/opengauss teams: - name: docs-database-rw permission: write @@ -924,11 +1034,13 @@ categories: title: API Reference type: api-ref pdf_name: rds-api-ref + hc_location: api/rds - html_location: docs/rds/umn rst_location: umn/source title: User Guide type: umn pdf_name: rds-umn + hc_location: usermanual/rds teams: - name: docs-database-rw permission: write @@ -942,6 +1054,7 @@ categories: title: User Guide type: umn pdf_name: sd-umn + hc_location: usermanual/sd teams: - name: docs-eco-rw permission: write diff --git a/otc_doc_convertor/comparator.py b/otc_doc_convertor/comparator.py new file mode 100644 index 00000000..1397250d --- /dev/null +++ b/otc_doc_convertor/comparator.py @@ -0,0 +1,78 @@ +import argparse +import logging +import requests +import pathlib +from bs4 import BeautifulSoup + + +def body_filter(tag): + return ( + tag.name == "div" + and tag.has_attr("id") + and tag["id"].startswith("body") + ) + + +class OTCComparator: + + def compare(self, url_prefix, file_path, file_name): + try: + data = requests.get( + f"https://docs.otc.t-systems.com/{url_prefix}/" + f"{file_name}.json") + page_data = None + for item in data.json(): + if ( + item.get("url").endswith(f"{file_name}.html") + and item['content'] + ): + page_data = item["content"] + break + original = BeautifulSoup(page_data, 'html.parser') + with open(f"{file_path}/{file_name}.html", "r") as f: + new_content = f.read() + new = BeautifulSoup(new_content, 'html.parser') + t1 = original.find(body_filter) + t2 = new.find(body_filter) + if t1 != t2: + logging.error("Content mismatch") + return False + logging.info("Content matches") + return True + except Exception as ex: + logging.error("Content comparison error %s" % ex) + return False + + def main(self): + logging.basicConfig(level=logging.INFO) + parser = argparse.ArgumentParser(description="Compare document data.") + parser.add_argument( + "path", + type=str, + help="Path to the document content (i.e. docs/ecs/api-ref") + parser.add_argument( + "url", + type=str, + help="url prefix in the helpcenter (i.e. api/ecs)") + args = parser.parse_args() + match = True + + for f in pathlib.Path(args.path).glob("*.html"): + logging.info(f"Comparing {f.name}") + if not self.compare( + args.url, args.path, f.name.replace(".html", "")): + match = False + + if not match: + logging.error("Comparison showed deviations") + exit(1) + else: + logging.info("No deviations found") + + +def main(): + OTCComparator().main() + + +if __name__ == '__main__': + main() diff --git a/playbooks/compare.yaml b/playbooks/compare.yaml new file mode 100644 index 00000000..3d1ad34d --- /dev/null +++ b/playbooks/compare.yaml @@ -0,0 +1,30 @@ +--- +- hosts: all + tasks: + - name: Read project docs configuration + ansible.builtin.include_vars: "{{ docs_update_data_file }}" + + - name: Detect list of changes + ansible.builtin.command: "git log -1 --name-only --pretty=" + args: + chdir: "{{ zuul.project.src_dir }}" + register: git_log + ignore_errors: true + changed_when: false + + - name: Verify document matches the one in the current HC + ansible.builtin.include_role: + name: "compare" + vars: + compare_html_location: "{{ doc.1.html_location }}" + compare_hc_location: "{{ doc.1.hc_location }}" + doc_label: "{{ doc.0.service_type }}_{{ doc.1.type }}" + loop: "{{ categories | json_query('*') | flatten | subelements('docs') }}" + loop_control: + loop_var: "doc" + label: "{{ doc.0.service_type }}_{{ doc.1.type }}" + when: + - "doc.1.html_location is defined" + - "doc.1.hc_location is defined" + - | + git_log.stdout is search(doc.1.html_location) diff --git a/requirements.txt b/requirements.txt index 4db383df..9b964d63 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,4 @@ bs4 lxml Jinja2 +requests diff --git a/roles/compare/tasks/main.yaml b/roles/compare/tasks/main.yaml new file mode 100644 index 00000000..f0b73acf --- /dev/null +++ b/roles/compare/tasks/main.yaml @@ -0,0 +1,5 @@ +- name: Verify document {{ doc_label }} matches the one in the current HC + args: + executable: "/bin/bash" + chdir: "{{ ansible_user_dir }}/{{ zuul.project.src_dir }}" + ansible.builtin.shell: "source {{ ansible_user_dir }}/.venv/bin/activate; otc-convert-compare {{ compare_html_location }} {{ compare_hc_location }}" diff --git a/roles/convert_doc/tasks/main.yaml b/roles/convert_doc/tasks/main.yaml index 1b4d0a59..12feae52 100644 --- a/roles/convert_doc/tasks/main.yaml +++ b/roles/convert_doc/tasks/main.yaml @@ -30,7 +30,6 @@ ansible.builtin.set_fact: convert_params: "{{ convert_params }} --templates-location {{ zuul_work_dir }}/templates" - - name: Convert {{ doc_label | default('') }} HTML to RST args: executable: "/bin/bash" diff --git a/setup.cfg b/setup.cfg index 461c968b..a7519989 100644 --- a/setup.cfg +++ b/setup.cfg @@ -25,3 +25,4 @@ packages = otc_doc_convertor [options.entry_points] console_scripts = otc-convert-doc = otc_doc_convertor.convertor:main + otc-convert-compare = otc_doc_convertor.comparator:main diff --git a/zuul.yaml b/zuul.yaml index 69215781..892ca1c9 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -20,7 +20,7 @@ Convert Application doc exports from html to rst and generate corresponding rst patch files. files: - - otc_doc_convertor + - otc_doc_convertor/convertor.py - docs/aom - docs/dms - docs/smn @@ -37,7 +37,7 @@ Convert BigData doc exports from html to rst and generate corresponding rst patch files. files: - - otc_doc_convertor + - otc_doc_convertor/convertor.py - docs/css - docs/dis - docs/dws @@ -56,7 +56,7 @@ Convert Compute doc exports from html to rst and generate corresponding rst patch files. files: - - otc_doc_convertor + - otc_doc_convertor/convertor.py - docs/as - docs/bms - docs/deh @@ -75,7 +75,7 @@ Convert Container doc exports from html to rst and generate corresponding rst patch files. files: - - otc_doc_convertor + - otc_doc_convertor/convertor.py - docs/cce - docs/swr - roles @@ -91,7 +91,7 @@ Convert Database doc exports from html to rst and generate corresponding rst patch files. files: - - otc_doc_convertor + - otc_doc_convertor/convertor.py - docs/das - docs/dcs - docs/dds @@ -112,7 +112,7 @@ Convert Network doc exports from html to rst and generate corresponding rst patch files. files: - - otc_doc_convertor + - otc_doc_convertor/convertor.py - docs/cdn - docs/dc - docs/dns @@ -136,7 +136,7 @@ Convert Management doc exports from html to rst and generate corresponding rst patch files. files: - - otc_doc_convertor + - otc_doc_convertor/convertor.py - docs/ces - docs/cts - docs/lts @@ -156,7 +156,7 @@ Convert Security doc exports from html to rst and generate corresponding rst patch files. files: - - otc_doc_convertor + - otc_doc_convertor/convertor.py - docs/anti-ddos - docs/iam - docs/kms @@ -175,7 +175,7 @@ Convert Storage doc exports from html to rst and generate corresponding rst patch files. files: - - otc_doc_convertor + - otc_doc_convertor/convertor.py - docs/cbr - docs/evs - docs/obs @@ -189,6 +189,22 @@ vars: docs_service_category: "storage" +- job: + name: otc-doc-exports-compare-current-hc + parent: unittests + voting: false + description: | + Verify whether content is matching the one published in the current + HelpCenter. + files: + - docs + - otc_doc_convertor/comparator.py + - roles/compare + vars: + docs_update_data_file: "metadata.yaml" + pre-run: playbooks/pre.yaml + run: playbooks/compare.yaml + - project: merge-mode: squash-merge default-branch: main @@ -248,6 +264,7 @@ dependencies: - name: otc-doc-exports-convert-storage soft: true + - otc-doc-exports-compare-current-hc gate: jobs: - otc-tox-pep8: