diff --git a/config/general_config/rdoproject-logs.yml b/config/general_config/rdoproject-logs.yml new file mode 100644 index 000000000..a6889b7be --- /dev/null +++ b/config/general_config/rdoproject-logs.yml @@ -0,0 +1,4 @@ +artcl_publish: true +artcl_use_zuul_swift_upload: true +artcl_swift_container: artifacts +artcl_full_artifact_url: "{{ lookup('env', 'SWIFT_artifacts_URL') }}" diff --git a/roles/collect-logs/defaults/main.yml b/roles/collect-logs/defaults/main.yml index 161f35951..6c0a1f1a5 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 683ec6847..c54565e00 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 c18116ab9..0e4ced35f 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.