encrypt-logs: fix a couple of download script issues

- The extra "/" in the URL makes the download fail, remove it

- The old download python script would output the root on the first
  line, then relative urls -- hence the loop was starting from 1.
  This should be 0 here, as we just output the raw urls.

- Fix typo in build uuid output

Change-Id: I8ff2a38b3117ddcb0d197fe39f2c168b35ab372b
This commit is contained in:
Ian Wienand 2022-02-22 17:08:56 +11:00
parent d49a9fd264
commit 111f552038
2 changed files with 4 additions and 4 deletions

View File

@ -1,4 +1,4 @@
# NOTE(ianw): 2022-02-22 16:57 AEST : comment to trigger prod run
# NOTE(ianw): 2022-02-22 17:11 AEST : comment to trigger prod run
- hosts: "codesearch:!disabled"
name: "Configure codesearch"
roles:

View File

@ -29,7 +29,7 @@ try:
for a in base_json['artifacts']:
if a['name'] == 'Encrypted logs':
url = a['url']
logfiles = (url + '/' + f for f in a['metadata']['logfiles'])
logfiles = (url + f for f in a['metadata']['logfiles'])
for l in logfiles:
print(l)
@ -69,8 +69,8 @@ log "Saving logs to ${DOWNLOAD_DIR}"
pushd "${DOWNLOAD_DIR}" > /dev/null
log "Getting logs from ${ZUUL_BUILD_ID}"
for (( i=1; i<$len; i++ )); do
log "Getting logs from ${ZUUL_BUILD_UUID}"
for (( i=0; i<$len; i++ )); do
file="${files[i]}"
printf -v _out " %-80s [ %04d/%04d ]" "${file}" "${i}" $(( len -1 ))
log "$_out"