From 5eb4c257f5b68515bff5bec7dec4033e342c98f3 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 21 Jan 2020 08:32:26 +0100 Subject: [PATCH] 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 --- roles/fetch-sphinx-tarball/tasks/html.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/fetch-sphinx-tarball/tasks/html.yaml b/roles/fetch-sphinx-tarball/tasks/html.yaml index 73c2a2759..3ef559328 100644 --- a/roles/fetch-sphinx-tarball/tasks/html.yaml +++ b/roles/fetch-sphinx-tarball/tasks/html.yaml @@ -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