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
changes/97/405397/2
Attila Darazs 6 years ago
parent 247e45cb7d
commit fc388656c4

@ -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') }}"

@ -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

@ -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

@ -2,13 +2,13 @@
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1; url={{ artcl_artifact_url }}/{{ lookup('env', 'BUILD_TAG') }}/">
<meta http-equiv="refresh" content="1; url={{ artcl_full_artifact_url }}">
<script type="text/javascript">
window.location.href = "{{ artcl_artifact_url }}/{{ lookup('env', 'BUILD_TAG') }}/"
window.location.href = "{{ artcl_full_artifact_url }}"
</script>
<title>Redirection to logs</title>
</head>
<body>
If you are not redirected automatically, follow the <a href='{{ artcl_artifact_url }}/{{ lookup('env', 'BUILD_TAG') }}/'>link to the logs</a>.
If you are not redirected automatically, follow the <a href='{{ artcl_full_artifact_url }}'>link to the logs</a>.
</body>
</html>

Loading…
Cancel
Save