Jan Kundrát | 3f9aa4b | 2019-06-05 23:25:38 +0200 | [diff] [blame] | 1 | - fail: |
| 2 | msg: "This job only works in the 'promote' pipeline." |
| 3 | when: zuul.pipeline != 'promote' |
| 4 | |
| 5 | - name: find artifact name |
| 6 | find: |
| 7 | paths: '{{ zuul.executor.work_root }}/artifacts' |
| 8 | file_type: 'file' |
| 9 | recurse: true |
| 10 | register: found_artifacts |
| 11 | |
| 12 | - name: some debugging |
| 13 | debug: |
| 14 | msg: 'Will create artifact: {{ zuul_artifacts_prefix }}/{{ item.path | dirname | relpath(zuul.executor.work_root + "/artifacts") }}/{{ item.path | basename }}' |
| 15 | loop: '{{ found_artifacts.files }}' |
| 16 | |
| 17 | - name: Upload artifacts to Swift object storage |
| 18 | os_object: |
| 19 | cloud: '{{ zuul_artifacts_cloud_config }}' |
| 20 | container: '{{ zuul_artifacts_container }}' |
| 21 | container_access: 'public' |
| 22 | filename: '{{ item.path }}' |
| 23 | name: '{{ zuul_artifacts_prefix }}/{{ item.path | dirname | relpath(zuul.executor.work_root + "/artifacts") }}/{{ item.path | basename }}' |
| 24 | state: present |
| 25 | loop: '{{ found_artifacts.files }}' |