Add delete_after to swift upload role

The module used by the swift upload supports setting the
x-delete-after header. However this is not plumbed through the role so
do that.

Change-Id: I9404a1c00062e4bb60d00a25b29897d4606df737
This commit is contained in:
Tobias Henkel 2018-07-31 15:32:05 +02:00
parent af332a6d75
commit 859aa2969a
No known key found for this signature in database
GPG Key ID: 03750DEC158E5FA2
2 changed files with 7 additions and 0 deletions

View File

@ -47,6 +47,12 @@ This uploads logs to an OpenStack Object Store (Swift) container.
If the container is created, should it be created with global read
ACLs. If the container already exists, it will not be modified.
.. zuul:rolevar:: zuul_log_delete_after
:default: 15552000
Number of seconds to delete objects after upload. Default is 6 months
(15552000 seconds) and if set to 0 X-Delete-After will not be set.
.. zuul:rolevar:: zuul_log_path
:default: Generated by the role `set-zuul-log-path-fact`

View File

@ -26,6 +26,7 @@
prefix: "{{ zuul_log_path }}"
files:
- "{{ zuul.executor.log_root }}/"
delete_after: "{{zuul_log_delete_after | default(omit) }}"
register: upload_results
- name: Return log URL to Zuul