ca2ee69e60
This is an alternative to I98c80f657f38c5e1ed5f28e5d36988a3429ad1f8 which does not modify the upload script, but rather queries the API and manifest for what to download. The script is a hybrid of python and bash to not implement json API parsing badly in bash, but not replicate curl badly in python either. The script sanity checks for dependencies, which are considered pretty standard for any developer who would be interested in downloading logs like this. The role writes out the script with the correct build values coded into it, so a potential user just has to run it without any arguments or modification. Change-Id: Ic33732adbfd3210191bf4976c3ee316cfc50568e
22 lines
533 B
YAML
22 lines
533 B
YAML
- hosts: all
|
|
tasks:
|
|
|
|
- name: Run local-log-download role
|
|
include_role:
|
|
name: local-log-download
|
|
vars:
|
|
local_log_download_api: 'https://zuul.opendev.org/api/tenant/{{ zuul.tenant }}'
|
|
|
|
post_tasks:
|
|
- name: Check for download script
|
|
delegate_to: localhost
|
|
file:
|
|
path: "{{ zuul.executor.log_root }}/download-logs.sh"
|
|
state: file
|
|
register: download_script
|
|
|
|
- name: Validate download script
|
|
assert:
|
|
that:
|
|
- download_script is not changed
|