From 1df0a2f9b91ba3329fb33eaa979ff3a2333b3a38 Mon Sep 17 00:00:00 2001 From: Attila Darazs Date: Thu, 1 Dec 2016 14:59:04 +0100 Subject: [PATCH] collect-logs: add rdoproject env requirements Zuul uses different variables and files to handle artifact uploading, this change adds the required modifications to collect and publish logs in the rdoproject.org Zuul environment. Change-Id: I5d74392210e55be5f5ecd889a5017750a874d45a --- roles/collect-logs/defaults/main.yml | 3 +++ roles/collect-logs/tasks/publish.yml | 4 ++++ roles/collect-logs/templates/full_logs.html.j2 | 6 +++--- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/roles/collect-logs/defaults/main.yml b/roles/collect-logs/defaults/main.yml index 161f359..6c0a1f1 100644 --- a/roles/collect-logs/defaults/main.yml +++ b/roles/collect-logs/defaults/main.yml @@ -34,6 +34,7 @@ artcl_collect_dir: "{{ lookup('env', 'PWD') }}/collected_files" artcl_gzip_only: true artcl_collect: true artcl_publish: false +artcl_full_artifact_url: "{{ artcl_artifact_url }}/{{ lookup('env', 'BUILD_TAG') }}/" artcl_use_rsync: false artcl_rsync_use_daemon: false @@ -41,6 +42,8 @@ artcl_use_swift: false # clean up the logs after 31 days artcl_swift_delete_after: 2678400 artcl_swift_container: logs +artcl_use_zuul_swift_upload: false +artcl_zuul_swift_upload_path: /usr/local/bin artcl_collect_sosreport: false diff --git a/roles/collect-logs/tasks/publish.yml b/roles/collect-logs/tasks/publish.yml index 683ec68..c54565e 100644 --- a/roles/collect-logs/tasks/publish.yml +++ b/roles/collect-logs/tasks/publish.yml @@ -29,6 +29,10 @@ OS_TENANT_NAME: "{{ artcl_swift_tenant_name }}" when: artcl_use_swift|bool + - name: use zuul_swift_upload.py to publish the files + command: "{{ artcl_zuul_swift_upload_path }}/zuul_swift_upload.py --name {{ artcl_swift_container }} --delete-after {{ artcl_swift_delete_after }} {{ artcl_collect_dir }}" + when: artcl_use_zuul_swift_upload|bool + - name: create the artifact location redirect file template: src: full_logs.html.j2 diff --git a/roles/collect-logs/templates/full_logs.html.j2 b/roles/collect-logs/templates/full_logs.html.j2 index c18116a..0e4ced3 100644 --- a/roles/collect-logs/templates/full_logs.html.j2 +++ b/roles/collect-logs/templates/full_logs.html.j2 @@ -2,13 +2,13 @@ - + Redirection to logs - If you are not redirected automatically, follow the link to the logs. + If you are not redirected automatically, follow the link to the logs.