diff --git a/jenkins/scripts/zuul_swift_upload.py b/jenkins/scripts/zuul_swift_upload.py index 8a46ac8bbb..58321e04a7 100755 --- a/jenkins/scripts/zuul_swift_upload.py +++ b/jenkins/scripts/zuul_swift_upload.py @@ -23,6 +23,7 @@ import argparse import magic import os import requests +import stat import sys import tempfile import time @@ -40,36 +41,64 @@ import time # in swift, is typically the rel path to the file # list supplied, # 'url': The URL to the log on the log server (absolute, supplied -# by logserver_prefix and swift_destination_prefix) +# by logserver_prefix and swift_destination_prefix), +# 'metadata': { +# 'mime': The filetype/mime, +# 'last_modified': Modification timestamp, +# 'size': The filesize in bytes, +# } # } -def generate_log_index(folder_links): +def generate_log_index(folder_links, header_message=''): """Create an index of logfiles and links to them""" output = 'Index of results\n' - output += '