diff --git a/.zuul.yaml b/.zuul.yaml index c03f412..28ae856 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -47,9 +47,7 @@ parent: publish-openstack-artifacts description: | Publish the results tar.gz and whl packages to tarballs.openstack.org. - pre-run: playbooks/python-tarball/pre.yaml run: playbooks/python-tarball/run.yaml - post-run: playbooks/python-tarball/post.yaml vars: release_python: python3 diff --git a/playbooks/python-tarball/post.yaml b/playbooks/python-tarball/post.yaml deleted file mode 100644 index 80630e7..0000000 --- a/playbooks/python-tarball/post.yaml +++ /dev/null @@ -1,28 +0,0 @@ -- hosts: all - roles: - - fetch-python-sdist-output - pre_tasks: - - name: Rename whl files to branch specific name - shell: "mv {{ item }}*.whl {{ item }}-{{ zuul.branch | replace('/', '-') }}.whl" - args: - chdir: "src/{{ zuul.project.canonical_name }}/dist" - with_items: - - "skyline" - - "skyline_apiserver" - - "skyline_config" - - "skyline_console" - - "skyline_log" - - "skyline_nginx" - - "skyline_policy_manager" - - name: Rename tar.gz files to branch specific name - shell: "mv {{ item }}*.tar.gz {{ item }}-{{ zuul.branch | replace('/', '-') }}.tar.gz" - args: - chdir: "src/{{ zuul.project.canonical_name }}/dist" - with_items: - - "skyline" - - "skyline-apiserver" - - "skyline-config" - - "skyline-console" - - "skyline-log" - - "skyline-nginx" - - "skyline-policy-manager" diff --git a/playbooks/python-tarball/pre.yaml b/playbooks/python-tarball/pre.yaml deleted file mode 100644 index 5a3f34d..0000000 --- a/playbooks/python-tarball/pre.yaml +++ /dev/null @@ -1,5 +0,0 @@ -- hosts: all - roles: - # We use ensure-pip to make sure the wheel module is installed - - ensure-pip - - revoke-sudo diff --git a/playbooks/python-tarball/run.yaml b/playbooks/python-tarball/run.yaml index 9352cd2..d59f0ea 100644 --- a/playbooks/python-tarball/run.yaml +++ b/playbooks/python-tarball/run.yaml @@ -26,8 +26,15 @@ $HOME/.local/bin/tox -e package args: chdir: "src/{{ zuul.project.canonical_name }}" - - name: Move all tar.gz and wheel packages into dist - shell: "mv libs/{{ item }}/dist/* dist/" + - name: Remove the invalid tar.gz packages + shell: + executable: /bin/bash + cmd: | + rm -rf *.tar.gz + args: + chdir: "src/{{ zuul.project.canonical_name }}/dist" + - name: Move all tar.gz packages into dist + shell: "mv libs/{{ item }}/dist/*.tar.gz dist/" args: chdir: "src/{{ zuul.project.canonical_name }}" with_items: @@ -37,4 +44,14 @@ - "skyline-log" - "skyline-nginx" - "skyline-policy-manager" - + - name: All tar.gz into skyline.tar.gz + shell: + executable: /bin/bash + cmd: | + mkdir -p packages + mv *.tar.gz packages + mv packages skyline-apiserver + tar -czf skyline-apiserver.tar.gz skyline-apiserver + rm -rf skyline-apiserver + args: + chdir: "src/{{ zuul.project.canonical_name }}/dist"