mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2026-02-17 11:10:09 -03:30
Upload logs to GCS after failure
Delete configure logs script as not needed Rework collect info script defaults Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
28
tests/cloud_playbooks/upload-logs-gcs.yml
Normal file
28
tests/cloud_playbooks/upload-logs-gcs.yml
Normal file
@@ -0,0 +1,28 @@
|
||||
---
|
||||
- hosts: localhost
|
||||
become: false
|
||||
gather_facts: no
|
||||
|
||||
vars:
|
||||
expire: 72000
|
||||
|
||||
tasks:
|
||||
- name: replace_test_id
|
||||
set_fact:
|
||||
test_name: "{{ test_id | regex_replace('\\.', '-') }}"
|
||||
|
||||
- name: Create a bucket
|
||||
gc_storage:
|
||||
bucket: "{{ test_name }}"
|
||||
mode: create
|
||||
expiration: "{{ expire }}"
|
||||
permission: private
|
||||
|
||||
- name: Upload collected diagnostic info
|
||||
gc_storage:
|
||||
bucket: "{{ test_name }}"
|
||||
mode: put
|
||||
permission: private
|
||||
expiration: "{{ expire }}"
|
||||
object: "build-{{ test_name }}-{{ kube_network_plugin }}-logs.tar.gz"
|
||||
src: logs.tar.gz
|
||||
Reference in New Issue
Block a user