Add cluster dump artifact in CI jobs (#5796)

This commit is contained in:
Maxime Guyot
2020-04-01 16:23:29 +02:00
committed by GitHub
parent 033afe1574
commit be9414fabe
10 changed files with 59 additions and 22 deletions

View File

@@ -0,0 +1,18 @@
---
- name: Generate dump folder
shell: "{{ bin_dir }}/kubectl cluster-info dump --all-namespaces --output-directory /tmp/cluster-dump"
no_log: true
when: inventory_hostname in groups['kube-master']
- name: Compress directory cluster-dump
archive:
path: /tmp/cluster-dump
dest: /tmp/cluster-dump.tgz
when: inventory_hostname in groups['kube-master']
- name: Fetch dump file
fetch:
src: /tmp/cluster-dump.tgz
dest: "{{ lookup('env', 'CI_PROJECT_DIR') }}/cluster-dump/{{ inventory_hostname }}.tgz"
flat: true
when: inventory_hostname in groups['kube-master']