a4e1f29468
These are jobs for the roles in this repo which are currently tested by the "base-integration" job in openstack-zuul-jobs. Move it into this repo and rename it "base-roles". Change-Id: Ibd07964a08120e033bc5a2deca18649bd0e74a48
47 lines
1.4 KiB
YAML
47 lines
1.4 KiB
YAML
- name: Run the fetch-output role
|
|
hosts: all
|
|
pre_tasks:
|
|
# ensure-output-dirs is run before this
|
|
- name: Write test log file
|
|
copy:
|
|
dest: '{{ zuul_output_dir }}/{{ item }}/{{ inventory_hostname }}'
|
|
content: '{{ item }}'
|
|
loop:
|
|
- logs
|
|
- docs
|
|
- artifacts
|
|
roles:
|
|
- role: fetch-output
|
|
post_tasks:
|
|
- name: Check that logs have been pulled
|
|
delegate_to: localhost
|
|
file:
|
|
# log_path fact is set in fetch-output
|
|
path: "{{ log_path }}/{{ inventory_hostname }}"
|
|
state: file
|
|
register: local_log_content
|
|
|
|
- name: Check that artifacts have been pulled
|
|
delegate_to: localhost
|
|
file:
|
|
path: "{{ zuul.executor.work_root }}/artifacts/{{ inventory_hostname }}"
|
|
state: file
|
|
register: local_artifact_content
|
|
|
|
- name: Check that docs have been pulled
|
|
delegate_to: localhost
|
|
file:
|
|
path: "{{ zuul.executor.work_root }}/docs/{{ inventory_hostname }}"
|
|
state: file
|
|
register: local_doc_content
|
|
|
|
- name: Validate that files were pulled correctly
|
|
assert:
|
|
that:
|
|
- local_log_content is not changed
|
|
- local_log_content is succeeded
|
|
- local_artifact_content is not changed
|
|
- local_artifact_content is succeeded
|
|
- local_doc_content is not changed
|
|
- local_doc_content is succeeded
|