| - fail: |
| msg: "This job only works in the 'promote' pipeline." |
| when: zuul.pipeline != 'promote' |
| |
| - name: find artifact name |
| find: |
| paths: '{{ zuul.executor.work_root }}/artifacts' |
| file_type: 'file' |
| recurse: true |
| register: found_artifacts |
| |
| - name: some debugging |
| debug: |
| msg: 'Will create artifact: {{ zuul_artifacts_prefix }}/{{ item.path | dirname | relpath(zuul.executor.work_root + "/artifacts") }}/{{ item.path | basename }}' |
| loop: '{{ found_artifacts.files }}' |
| |
| - name: Upload artifacts to Swift object storage |
| os_object: |
| cloud: '{{ zuul_artifacts_cloud_config }}' |
| container: '{{ zuul_artifacts_container }}' |
| container_access: 'public' |
| filename: '{{ item.path }}' |
| name: '{{ zuul_artifacts_prefix }}/{{ item.path | dirname | relpath(zuul.executor.work_root + "/artifacts") }}/{{ item.path | basename }}' |
| state: present |
| loop: '{{ found_artifacts.files }}' |