Jan Kundrát | 1e38b3d | 2019-02-26 19:37:49 +0100 | [diff] [blame] | 1 | - fail: |
| 2 | msg: "This role only works in the 'promote' pipeline." |
| 3 | when: zuul.pipeline != 'promote' |
| 4 | |
| 5 | - name: Ensure artifacts directory exists |
| 6 | delegate_to: localhost |
| 7 | file: |
| 8 | path: "{{ zuul.executor.work_root }}/artifacts" |
| 9 | state: directory |
| 10 | |
| 11 | - name: Collect artifacts |
| 12 | synchronize: |
| 13 | dest: "{{ zuul.executor.work_root }}/artifacts/" |
| 14 | mode: pull |
| 15 | src: "{{ zuul_output_dir }}/artifacts/" |
| 16 | verify_host: true |
| 17 | |
| 18 | - name: "Purge artifacts on the build node so that they are not uploaded the promote job's log directory" |
| 19 | file: |
| 20 | path: "{{ zuul_output_dir }}/artifacts/" |
| 21 | state: absent |
| 22 | |
| 23 | - name: "Re-create an empty artifacts directory on the build node so that `fetch-output` doesn't complain" |
| 24 | file: |
| 25 | path: "{{ zuul_output_dir }}/artifacts/" |
| 26 | state: directory |