fetch-sphinx: Exclude doctrees directory

The sphinx .doctrees directory is not needed for publishing. By default
sphinx puts it below html. Some projects add to sphinx-build a "-d"
option to put the content elsewhere and not publish it.

This change assures that a .doctrees directory below "html" will not put
stored as artifact and published later.

Statistics: In all of OpenDev, we have:
* 511 repos putting .doctrees elsewhere and thus not publishing it
* 631 repos  no caring and thus publishing .doctrees

The size of .doctrees directory is not neglectable: 2MB for
system-config, 14 MB for nova.

Change-Id: I63b581164aab84352d9e80278cf4a8d634ff28af
This commit is contained in:
Andreas Jaeger 2020-01-21 08:32:26 +01:00
parent f2680ebc70
commit 5eb4c257f5

View File

@ -5,7 +5,7 @@
register: html_archive
- name: Archive HTML
command: "tar -f {{ html_archive.path }} -C {{ zuul_work_dir }}/{{ sphinx_build_dir }}/html -cj ."
command: "tar -f {{ html_archive.path }} -C {{ zuul_work_dir }}/{{ sphinx_build_dir }}/html --exclude=.doctrees -cj ."
args:
warn: false