diff --git a/playbooks/publish/api-guide.yaml b/playbooks/publish/api-docs.yaml similarity index 85% rename from playbooks/publish/api-guide.yaml rename to playbooks/publish/api-docs.yaml index 755fd9e979..976b99e663 100644 --- a/playbooks/publish/api-guide.yaml +++ b/playbooks/publish/api-docs.yaml @@ -14,7 +14,7 @@ - role: create-afs-token when: zuul_success | bool - role: upload-afs - afs_target: "{{ afs.path }}/api-guide/{{ service_type_data.service_type }}" + afs_target: "{{ afs.path }}/{{ api_path }}/{{ service_type_data.service_type }}" when: zuul_success | bool - role: destroy-afs-token when: zuul_success | bool diff --git a/playbooks/publish/api-ref.yaml b/playbooks/publish/api-ref.yaml deleted file mode 100644 index 99e7aed027..0000000000 --- a/playbooks/publish/api-ref.yaml +++ /dev/null @@ -1,20 +0,0 @@ -- hosts: all - roles: - - role: write-root-marker - when: zuul_success | bool - - role: fetch-sphinx-output - sphinx_output_suffix: "/" - zuul_executor_dest: "{{ zuul.executor.work_root }}/artifacts" - when: zuul_success | bool - -- hosts: localhost - roles: - - role: set-service-type-data-fact - when: zuul_success | bool - - role: create-afs-token - when: zuul_success | bool - - role: upload-afs - afs_target: "{{ afs.path }}/api-ref/{{ service_type_data.service_type }}" - when: zuul_success | bool - - role: destroy-afs-token - when: zuul_success | bool diff --git a/zuul.d/jobs.yaml b/zuul.d/jobs.yaml index 3bfaed18f4..4d797ab1be 100644 --- a/zuul.d/jobs.yaml +++ b/zuul.d/jobs.yaml @@ -777,46 +777,53 @@ name: afs - job: - name: publish-api-guide + name: publish-api-tox-docs-base description: | - Publish api-guide document to - https://developer.openstack.org/api-guide. - pre-run: playbooks/sphinx/pre.yaml - run: playbooks/sphinx/run.yaml - post-run: playbooks/publish/api-guide.yaml - roles: - - zuul: zuul/zuul-jobs - - zuul: openstack/openstack-zuul-jobs + Base job for publishing api-guide and api-ref jobs to developer site. # We only publish the master branch, so no need to run # for changes on other branches. branches: master + abstract: true + protected: true + pre-run: playbooks/project-config/pre-tox.yaml + run: playbooks/project-config/run-tox.yaml + post-run: + - playbooks/project-config/post-tox.yaml + - playbooks/publish/api-docs.yaml + required-projects: + - name: openstack/requirements + roles: + - zuul: zuul/zuul-jobs + - zuul: openstack/openstack-zuul-jobs vars: - sphinx_source_dir: api-guide/source - sphinx_build_dir: api-guide/build + bindep_profile: compile doc secrets: - secret: afsdeveloper_secret name: afs +- job: + name: publish-api-guide + parent: publish-api-tox-docs-base + description: | + Publish api-guide document to + https://developer.openstack.org/api-guide. + final: true + vars: + sphinx_build_dir: api-guide/build + tox_envlist: api-guide + api_path: api-guide + - job: name: publish-api-ref + parent: publish-api-tox-docs-base description: | Publish api-ref document to https://developer.openstack.org/api-ref. - pre-run: playbooks/sphinx/pre.yaml - run: playbooks/sphinx/run.yaml - post-run: playbooks/publish/api-ref.yaml - roles: - - zuul: zuul/zuul-jobs - - zuul: openstack/openstack-zuul-jobs - # We only publish the master branch, so no need to run - # for changes on other branches. - branches: master + final: true vars: sphinx_build_dir: api-ref/build - sphinx_source_dir: api-ref/source - secrets: - - secret: afsdeveloper_secret - name: afs + tox_envlist: api-ref + api_path: api-ref - job: name: publish-install-guide