---
- job:
    name: otc-doc-exports-convert-base
    parent: unittests
    abstract: true
    nodeset: vm
    description: |
      Convert doc exports from html to rst and generate corresponding rst diff
      files.
    pre-run: playbooks/pre.yaml
    run: playbooks/run.yaml
    post-run: playbooks/post.yaml
    vars:
      docs_update_data_file: "metadata.yaml"

- job:
    name: otc-doc-exports-convert-application
    parent: otc-doc-exports-convert-base
    description: |
      Convert Application doc exports from html to rst and generate
      corresponding rst patch files.
    files:
      - otc_doc_convertor
      - docs/aom
      - docs/dms
      - docs/smn
      - roles
      - templates
    provides: otc-doc-exports-convert-application
    vars:
      docs_service_category: "application"

- job:
    name: otc-doc-exports-convert-big-data
    parent: otc-doc-exports-convert-base
    description: |
      Convert BigData doc exports from html to rst and generate
      corresponding rst patch files.
    files:
      - otc_doc_convertor
      - docs/css
      - docs/dis
      - docs/dws
      - docs/modelarts
      - docs/mrs
      - roles
      - templates
    provides: otc-doc-exports-convert-big-data
    vars:
      docs_service_category: "big_data"

- job:
    name: otc-doc-exports-convert-compute
    parent: otc-doc-exports-convert-base
    description: |
      Convert Compute doc exports from html to rst and generate
      corresponding rst patch files.
    files:
      - otc_doc_convertor
      - docs/as
      - docs/bms
      - docs/deh
      - docs/ecs
      - docs/ims
      - roles
      - templates
    provides: otc-doc-exports-convert-compute
    vars:
      docs_service_category: "compute"

- job:
    name: otc-doc-exports-convert-container
    parent: otc-doc-exports-convert-base
    description: |
      Convert Container doc exports from html to rst and generate
      corresponding rst patch files.
    files:
      - otc_doc_convertor
      - docs/cce
      - docs/swr
      - roles
      - templates
    provides: otc-doc-exports-convert-container
    vars:
      docs_service_category: "container"

- job:
    name: otc-doc-exports-convert-database
    parent: otc-doc-exports-convert-base
    description: |
      Convert Database doc exports from html to rst and generate
      corresponding rst patch files.
    files:
      - otc_doc_convertor
      - docs/das
      - docs/dcs
      - docs/dds
      - docs/gaussdb_mysql
      - docs/gaussdb_nosql
      - docs/gaussdb_nosql
      - docs/rds
      - roles
      - templates
    provides: otc-doc-exports-convert-database
    vars:
      docs_service_category: "database"

- job:
    name: otc-doc-exports-convert-network
    parent: otc-doc-exports-convert-base
    description: |
      Convert Network doc exports from html to rst and generate
      corresponding rst patch files.
    files:
      - otc_doc_convertor
      - docs/cdn
      - docs/dc
      - docs/dns
      - docs/eip
      - docs/elb
      - docs/natgw
      - docs/plas
      - docs/vpc
      - docs/vpcep
      - docs/vpn
      - roles
      - templates
    provides: otc-doc-exports-convert-network
    vars:
      docs_service_category: "network"

- job:
    name: otc-doc-exports-convert-md
    parent: otc-doc-exports-convert-base
    description: |
      Convert Management doc exports from html to rst and generate
      corresponding rst patch files.
    files:
      - otc_doc_convertor
      - docs/ces
      - docs/cts
      - docs/lts
      - docs/rts
      - docs/tms
      - roles
      - templates
    provides: otc-doc-exports-convert-network
    vars:
      docs_service_category: "md"

- job:
    name: otc-doc-exports-convert-security
    parent: otc-doc-exports-convert-base
    description: |
      Convert Security doc exports from html to rst and generate
      corresponding rst patch files.
    files:
      - otc_doc_convertor
      - docs/anti-ddos
      - docs/iam
      - docs/kms
      - docs/waf
      - docs/wafd
      - roles
      - templates
    provides: otc-doc-exports-convert-security
    vars:
      docs_service_category: "security-services"

- job:
    name: otc-doc-exports-convert-storage
    parent: otc-doc-exports-convert-base
    description: |
      Convert Storage doc exports from html to rst and generate
      corresponding rst patch files.
    files:
      - otc_doc_convertor
      - docs/cbr
      - docs/evs
      - docs/obs
      - docs/sdrs
      - docs/sfs
      - docs/vbs
      - roles
      - templates
    provides: otc-doc-exports-convert-storage
    vars:
      docs_service_category: "storage"

- project:
    merge-mode: squash-merge
    default-branch: main
    vars:
      docs_rst_location: "docs"
      docs_base_location: "base"
      docs_new_location: "new"
      ensure_pandoc_version: "2.18"
      propose_change_git_provider: "gitea"
      propose_change_git_baseurl: "gitea.eco.tsi-dev.otc-service.com"
    check:
      jobs:
        - otc-tox-pep8:
            nodeset: ubuntu-focal
        - otc-doc-exports-convert-application
        - otc-doc-exports-convert-big-data
        - otc-doc-exports-convert-compute
        - otc-doc-exports-convert-container
        - otc-doc-exports-convert-database
        - otc-doc-exports-convert-network
        - otc-doc-exports-convert-md
        - otc-doc-exports-convert-security
        - otc-doc-exports-convert-storage
        - otc-doc-exports-propose-update-application:
            dependencies:
              - name: otc-doc-exports-convert-application
                soft: true
        - otc-doc-exports-propose-update-big-data:
            dependencies:
              - name: otc-doc-exports-convert-big-data
                soft: true
        - otc-doc-exports-propose-update-compute:
            dependencies:
              - name: otc-doc-exports-convert-compute
                soft: true
        - otc-doc-exports-propose-update-container:
            dependencies:
              - name: otc-doc-exports-convert-container
                soft: true
        - otc-doc-exports-propose-update-database:
            dependencies:
              - name: otc-doc-exports-convert-database
                soft: true
        - otc-doc-exports-propose-update-network:
            dependencies:
              - name: otc-doc-exports-convert-network
                soft: true
        - otc-doc-exports-propose-update-md:
            dependencies:
              - name: otc-doc-exports-convert-md
                soft: true
        - otc-doc-exports-propose-update-security:
            dependencies:
              - name: otc-doc-exports-convert-security
                soft: true
        - otc-doc-exports-propose-update-storage:
            dependencies:
              - name: otc-doc-exports-convert-storage
                soft: true
    gate:
      jobs:
        - otc-tox-pep8:
            nodeset: ubuntu-focal
        - otc-doc-exports-convert-application
        - otc-doc-exports-convert-big-data
        - otc-doc-exports-convert-compute
        - otc-doc-exports-convert-container
        - otc-doc-exports-convert-database
        - otc-doc-exports-convert-network
        - otc-doc-exports-convert-md
        - otc-doc-exports-convert-security
        - otc-doc-exports-convert-storage
