Add fetch-python-sdist-output role
Create a role to upload python sdist results to artifact directory on executor. Change-Id: I05158958af793fcfaef1d978cb7f38a38af95fc6 Signed-off-by: Paul Belanger <pabelanger@redhat.com>
This commit is contained in:
parent
4685741928
commit
6bb8096a0e
1
roles/fetch-python-sdist-output/README.rst
Normal file
1
roles/fetch-python-sdist-output/README.rst
Normal file
@ -0,0 +1 @@
|
||||
Collect output from a python sdist build
|
25
roles/fetch-python-sdist-output/tasks/main.yaml
Normal file
25
roles/fetch-python-sdist-output/tasks/main.yaml
Normal file
@ -0,0 +1,25 @@
|
||||
- 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: Ensure artifacts directory exists
|
||||
file:
|
||||
path: "{{ zuul.executor.work_root }}/artifacts"
|
||||
state: directory
|
||||
delegate_to: localhost
|
||||
|
||||
- name: Collect artifacts
|
||||
synchronize:
|
||||
dest: "{{ zuul.executor.work_root }}/artifacts/"
|
||||
mode: pull
|
||||
src: "{{ item.path }}"
|
||||
verify_host: true
|
||||
with_items: "{{ result.files }}"
|
Loading…
Reference in New Issue
Block a user