This adds a new --verbose option to let the script prints logging.debug
statement. If set, this option also enables requests debuging so that
http status code are also displayed.
Change-Id: Iacb2ac306b44e355b2e2c5069a38bf02afd3111b
Automatically append any help/information to genreated index.html
files if the help file exists in that directory. Default the help
files to index_footer.html
Change-Id: I053a2d0dd19c697a18c64f41ebcbed7f5e1d40d5
There are sources of machine generated content other than the zuul swift
upload script. These generators may also create index.html files for us,
if they do preserve the original index.html and do not create a new one.
Change-Id: I9785c4d42d0e0693789976b408d0118c4ea63e50
This fixes the check that is done on "if delete_after:" when the
value is set to 0 (which would be True if it is a string).
Change-Id: I006c120325de896c5c5de23a423497864e0e0d40
The delete after param is passed as part of the payload, not a
header when use the formpost middleware.
Change-Id: If0ce42e0363f3c29f5b8292c443024adc008a5a2
Set the swift delete after header in the zuul swift upload script so
that swift handles log deletion for us. Default to a delete after of 6
months but allow the value to be configurable.
Headers are sent per a post. Posts are done per file-job (or queue
entry). Additionals headers can be set up when building the queue.
Co-Authored-By: Joshua Hesketh <josh@nitrotech.org>
Change-Id: Idd3b4b0c9a6819cda5e9b36ce188a61b558873be
Allow supplying filename and paths with '**' recursive glob matches
to zuul-swift-upload. Since bash (or shell etc) will expand on any
filenames provided to the program this needs to be used in quotes.
Usage example:
./zuul_swift_upload.py my_results.txt '**/sdist/*.zip' output.log
The hierarchy is always flattened meaning the supplied list is
placed in the topmost generated index.html. Sub-folders still keep
their hierarchy.
Change-Id: I9ba04f7e46b579dcf3f8ad0bd188f41fa5dbcad9
The zuul swift uploader was uploading all files serially. Speed things
along by performing file uploads with a thread pool. This should do a
better job of utilizing networking throughput as we will always be
uploading as many files as possible (up to the supplied max).
Co-Authored-By: Joshua Hesketh <josh@nitrotech.org>
Change-Id: I38806edb2db1b55a6b4d0cdf7794ec00c9fe9a35
Check an icon exists for the file mimetype or otherwise use a
default icon on the swift log indexes.
Change-Id: Id8ae918c5888b19c2702a711a292ca8f0176cbdd
Match apache's mod-index by displaying file sizes as just 'K' or
'M' etc rather than the full 'KiB'.
Also right-align the sizes for readability.
Change-Id: I99585861463ad47ef358b8758bbb7575ff58bc40
To help see if generating or uploading is slow with zuul-swift,
add in some crude debugging. This will never be displayed as the
console log is fetched before uploading is done so to see the
debug messages you'll have to look at the logs Jenkins captures.
The useful information will be to look at the differences in the
timestamps on the messages captured by Jenkins.
Change-Id: I7c31084a92218c3d12ebed68717088337b06f905
Sort the folders first then the file list for swift indexes.
The sorted() function runs on the whole path even though only the
basename is displayed. This will still result in the correct order
though as the folder paths will be identical.
Change-Id: I9c9eb7abad121f23884d58c17771be412e7614c2
To have feature parity with apache's mod_autoindex generate the
extra information we need when pushing the results (filesize etc).
Change-Id: Ic0b0c9f4d3e28fc01ace9d8d3dd97ea86bddf526
When zuul_swift_upload generates index.html's give it the option of also
linking to parent directories from subdirs.
To do this, rework the script to have a consisten file_details dict that
can be used to push to swift or generate links from etc.
Change-Id: If6e25b64c7355449ddc46a694d7678e2c4ce08f8
The magic bindings updated to not prefix their constants with
MAGIC. Centos has an old version so we need to use the old constant
names (which are backwards compatible).
I've tested this on centos6 and ubuntu 12.04
Change-Id: Ic64c7395323e7583b37cf624d062cc3f40c89893
This repo was created from filter branching the openstack-infra/
config repo. This process brought a lot of cruft with it in the
form of directories that we no longer need. This patch removes
that cruft so we begin with a tidier repo.
Change-Id: Ibffad1b11c0c5f84eedfb0365369f60c4961a0f3