c12s-kubespray/tests/cloud_playbooks/upload-logs-gcs.yml
Bogdan Dobrelya d1bb75e65c 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>
2016-11-03 15:25:37 +01:00

28 lines
649 B
YAML

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