Update build to put content into sphinx location
The publication job looks in doc/build/html but we're writing it to publish/. Update the location ... and also add a success-url to the job so we can verify the content. Change-Id: I44de36fcac19a754ec107554b7a300dacd62aa3a
This commit is contained in:
parent
d86f1821ce
commit
e021ccb5ef
|
@ -14,5 +14,7 @@
|
||||||
Run tests for service-types-authority project.
|
Run tests for service-types-authority project.
|
||||||
|
|
||||||
Uses tox with the ``publish`` environment.
|
Uses tox with the ``publish`` environment.
|
||||||
|
success-url: html/
|
||||||
|
post-run: playbooks/fetch-publish-output.yaml
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: publish
|
tox_envlist: publish
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- role: fetch-sphinx-output
|
||||||
|
sphinx_output_src: "{{ zuul.project.src_dir }}/doc/build/html"
|
||||||
|
zuul_executor_dest: "{{ zuul.executor.log_root }}"
|
||||||
|
when: zuul_success | bool
|
|
@ -24,7 +24,7 @@ import requests
|
||||||
|
|
||||||
HTTP_LOCATION = 'https://service-types.openstack.org/service-types.json'
|
HTTP_LOCATION = 'https://service-types.openstack.org/service-types.json'
|
||||||
SPECS_BASE = 'http://specs.openstack.org/openstack'
|
SPECS_BASE = 'http://specs.openstack.org/openstack'
|
||||||
OUTDIR = 'publish'
|
OUTDIR = 'doc/build/html'
|
||||||
HEADER = '''<div class="section" id="service-types-authority">
|
HEADER = '''<div class="section" id="service-types-authority">
|
||||||
<h1>OpenStack Service Types Authority Data</h1>
|
<h1>OpenStack Service Types Authority Data</h1>
|
||||||
<p>For more information on the files, see:
|
<p>For more information on the files, see:
|
||||||
|
@ -108,7 +108,7 @@ def main():
|
||||||
shutil.copyfile(filename, os.path.join(OUTDIR, filename))
|
shutil.copyfile(filename, os.path.join(OUTDIR, filename))
|
||||||
|
|
||||||
latest_file = 'service-types.json.{version}'.format(version=latest_version)
|
latest_file = 'service-types.json.{version}'.format(version=latest_version)
|
||||||
with open('publish/HEADER.html', 'w') as header:
|
with open('{outdir}/HEADER.html'.format(outdir=OUTDIR), 'w') as header:
|
||||||
header.write(HEADER.format(latest_file=latest_file,
|
header.write(HEADER.format(latest_file=latest_file,
|
||||||
specs_base=SPECS_BASE))
|
specs_base=SPECS_BASE))
|
||||||
return 0
|
return 0
|
||||||
|
|
Loading…
Reference in New Issue