diff --git a/playbooks/python-branch-tarball/post.yaml b/playbooks/python-branch-tarball/post.yaml index bcc86bb911..d7f508c960 100644 --- a/playbooks/python-branch-tarball/post.yaml +++ b/playbooks/python-branch-tarball/post.yaml @@ -1,8 +1,11 @@ - hosts: all roles: - fetch-tox-output + - fetch-python-sdist-output - post_tasks: + pre_tasks: + # NOTE(pabelanger): This need to run before fetch-python-sdist-output to + # properly rename wheels and tarballs. - name: Rename files to branch specific name shell: "mv *.{{ item }} {{ zuul.project.short_name }}-{{ zuul.branch | replace('/', '-') }}.{{ item }}" args: @@ -10,29 +13,3 @@ with_items: - "tar.gz" - "whl" - - - 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 }}" diff --git a/playbooks/python-tarball/post.yaml b/playbooks/python-tarball/post.yaml new file mode 100644 index 0000000000..ec6b105482 --- /dev/null +++ b/playbooks/python-tarball/post.yaml @@ -0,0 +1,4 @@ +- hosts: all + roles: + - fetch-tox-output + - fetch-python-sdist-output diff --git a/zuul.yaml b/zuul.yaml index 2f7b103556..8d4965b691 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -168,7 +168,11 @@ parent: publish-openstack-artifacts description: | Release python tarballs / wheels to pypi. - post-run: playbooks/publish/testpypi + pre-run: playbooks/python-tarball/pre + run: playbooks/python-tarball/run + post-run: + - playbooks/python-tarball/post + - playbooks/publish/pypi secrets: - secret: testpypi_secret name: pypi_info