
So far it takes some effort and workaround to inherit zuul jobs, airship-jarvis, in particular. Gate scripts are running from the directory different from the opendev.org/airship/charts when inheriting. Thus, adding a single variable (gate_scripts_relative_path) that is responsible for setting a directory for the gate scripts should solve the issue and improve the inheritance. Change-Id: Icc06211a8d5a0814f5e902ebee97d440d3d2943a
29 lines
645 B
YAML
29 lines
645 B
YAML
---
|
|
- name: Create directories for logs
|
|
file:
|
|
path: "{{ logs_dir }}/{{ item }}"
|
|
state: directory
|
|
with_items:
|
|
- objects/cluster
|
|
- objects/namespaced
|
|
- pod-logs
|
|
|
|
- name: Gather kubernetes logs
|
|
shell: |
|
|
set -x;
|
|
./tools/gate/gather-pod-logs.sh
|
|
./tools/gate/gather-objects.sh
|
|
environment:
|
|
LOGDIR: "{{ logs_dir }}"
|
|
args:
|
|
chdir: "{{ zuul.project.src_dir }}/{{ gate_scripts_relative_path | default('') }}"
|
|
|
|
- name: Upload the logs
|
|
synchronize:
|
|
mode: pull
|
|
src: "{{ logs_dir }}"
|
|
dest: "{{ zuul.executor.log_root }}/{{ inventory_hostname }}"
|
|
owner: no
|
|
group: no
|
|
ignore_errors: True
|