-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[zuul] Add post-task for log collection
Copies logs from the job nodes so they can be viewed in the job buildresults
- Loading branch information
1 parent
fab0b92
commit 610ec15
Showing
2 changed files
with
40 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
--- | ||
# Based on https://raw.githubusercontent.com/openstack-k8s-operators/nova-operator/bc10c4f579f8538899ac7bc5f87bfdb62d7042a4/ci/nova-operator-base/playbooks/collect-logs.yaml | ||
- hosts: all | ||
name: Create zuul-output log dir | ||
gather_facts: false | ||
tasks: | ||
- name: Create log dir | ||
ansible.builtin.file: | ||
path: "{{ ansible_user_dir }}/zuul-output/logs" | ||
state: directory | ||
mode: "0755" | ||
|
||
- hosts: controller | ||
name: Collect logs on the controller | ||
gather_facts: false | ||
tasks: | ||
- name: Create log dir | ||
ansible.builtin.file: | ||
path: "{{ ansible_user_dir }}/zuul-output/logs/controller" | ||
state: directory | ||
mode: "0755" | ||
|
||
- name: Collect general openshift cr info | ||
ansible.builtin.shell: | | ||
cp ~/crc-start.log . | ||
args: | ||
chdir: "{{ ansible_user_dir }}/zuul-output/logs/controller" | ||
changed_when: true | ||
ignore_errors: true | ||
|
||
- hosts: all | ||
name: Copy files from controller on node | ||
gather_facts: false | ||
tasks: | ||
- name: Copy files from controller on node | ||
ansible.builtin.include_role: | ||
name: fetch-output | ||
|