---
- 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-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/ecs
      - docs/ims
      - roles
      - templates
    provides: otc-doc-exports-convert-compute
    vars:
      docs_service_category: "compute"

- 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/modelarts
      - roles
      - templates
    vars:
      docs_service_category: "big_data"

- 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-compute
        - otc-doc-exports-convert-big-data
        - otc-doc-exports-propose-update-compute:
            dependencies:
              - name: otc-doc-exports-convert-compute
                soft: true
        - otc-doc-exports-propose-update-big-data:
            dependencies:
              - name: otc-doc-exports-convert-big-data
                soft: true
    gate:
      jobs:
        - otc-tox-pep8:
            nodeset: ubuntu-focal
        - otc-doc-exports-convert-compute
        - otc-doc-exports-convert-big-data
