6b8cc6d468
Change-Id: I705d1b10696326f3d4d5bef4b5a88a83f2c3d960
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
- hosts: all
|
|
tasks:
|
|
- name: Find tarballs and wheels in dist folder.
|
|
find:
|
|
file_type: file
|
|
paths: "src/{{ zuul.project.canonical_name }}/dist"
|
|
patterns: "*.tar.gz,*.whl"
|
|
register: result
|
|
|
|
- name: Display stat for tarballs and wheels.
|
|
stat:
|
|
path: "{{ item.path }}"
|
|
with_items: "{{ result.files }}"
|
|
|
|
- name: Create destination directory on executor
|
|
delegate_to: localhost
|
|
file:
|
|
path: "{{ zuul.executor.work_root }}/artifacts"
|
|
state: directory
|
|
mode: 0755
|
|
|
|
- name: Collect tarball artifacts.
|
|
synchronize:
|
|
dest: "{{ zuul.executor.work_root }}/artifacts"
|
|
mode: pull
|
|
src: "{{ item.path }}"
|
|
verify_host: true
|
|
owner: no
|
|
group: no
|
|
with_items: "{{ result.files }}"
|
|
|
|
- name: Return sdist artifacts to Zuul
|
|
loop: "{{ result.files }}"
|
|
when: "item.path.endswith('.tar.gz')"
|
|
zuul_return:
|
|
data:
|
|
zuul:
|
|
artifacts:
|
|
- name: "Python sdist"
|
|
url: "artifacts/{{ item.path | basename }}"
|
|
metadata:
|
|
type: python_sdist
|
|
|
|
- name: Return wheel artifacts to Zuul
|
|
loop: "{{ result.files }}"
|
|
when: "item.path.endswith('.whl')"
|
|
zuul_return:
|
|
data:
|
|
zuul:
|
|
artifacts:
|
|
- name: "Python wheel"
|
|
url: "artifacts/{{ item.path | basename }}"
|
|
metadata:
|
|
type: python_wheel
|