diff --git a/.zuul.yaml b/.zuul.yaml index 6b1efe7..de3aa4d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -5,6 +5,7 @@ post-run: tests/collect-logs.yaml roles: - zuul: openstack/ansible-role-nodepool + - zuul: openstack/zuul-jobs # Testing for nodepool_install_method: pip - job: diff --git a/tests/collect-logs.yaml b/tests/collect-logs.yaml index 9014f1d..3df2f31 100644 --- a/tests/collect-logs.yaml +++ b/tests/collect-logs.yaml @@ -1,10 +1,24 @@ - hosts: all tasks: - - name: Collect nodepool log files + - name: Prepare nodepool log files + become: yes synchronize: - dest: "{{ zuul.executor.log_root }}/logs" - mode: pull + dest: "{{ zuul_output_dir }}/logs/logs" rsync_opts: - "--relative" - src: /var/log/nodepool + - "--chown={{ ansible_user_id }}:{{ ansible_user_id }}" + src: "{{ item }}" + verify_host: true + delegate_to: "{{ inventory_hostname }}" + with_items: + - /etc/nodepool + - /var/log/nodepool + + # TODO: Migrate to fetch-zuul-logs when + # https://review.openstack.org/#/c/583346/ is merged. + - name: Collect log output + synchronize: + dest: "{{ zuul.executor.log_root }}/" + mode: pull + src: "{{ zuul_output_dir }}/logs/" verify_host: true diff --git a/tests/playbooks/pre.yaml b/tests/playbooks/pre.yaml index d5aa7f3..5386849 100644 --- a/tests/playbooks/pre.yaml +++ b/tests/playbooks/pre.yaml @@ -1,9 +1,14 @@ - hosts: all tasks: + # TODO(pabelanger): Remove once this lands in our base job in + # project-config. + - name: Execute ensure-output-dirs role + include_role: + name: ensure-output-dirs + - name: Disable extra wheels mirror become: yes lineinfile: dest: /etc/pip.conf regexp: ^extra-index-url state: absent -