diff --git a/playbooks/python/release.yaml b/playbooks/python/release.yaml new file mode 100644 index 000000000..3ea4aef6f --- /dev/null +++ b/playbooks/python/release.yaml @@ -0,0 +1,3 @@ +- hosts: all + roles: + - build-python-release diff --git a/playbooks/python/sdist.yaml b/playbooks/python/sdist.yaml deleted file mode 100644 index f157dea3f..000000000 --- a/playbooks/python/sdist.yaml +++ /dev/null @@ -1,3 +0,0 @@ -- hosts: all - roles: - - build-python-sdist diff --git a/roles/build-python-release/defaults/main.yaml b/roles/build-python-release/defaults/main.yaml new file mode 100644 index 000000000..9739eb171 --- /dev/null +++ b/roles/build-python-release/defaults/main.yaml @@ -0,0 +1 @@ +zuul_work_dir: "{{ zuul.project.src_dir }}" diff --git a/roles/build-python-sdist/tasks/main.yaml b/roles/build-python-release/tasks/main.yaml similarity index 69% rename from roles/build-python-sdist/tasks/main.yaml rename to roles/build-python-release/tasks/main.yaml index c428ac15e..2ca846531 100644 --- a/roles/build-python-sdist/tasks/main.yaml +++ b/roles/build-python-release/tasks/main.yaml @@ -1,4 +1,4 @@ - name: Build a tarball and wheel command: python setup.py sdist bdist_wheel args: - chdir: "{{ python_sdist_chdir }}" + chdir: "{{ zuul_work_dir }}" diff --git a/roles/build-python-sdist/defaults/main.yaml b/roles/build-python-sdist/defaults/main.yaml deleted file mode 100644 index 484656152..000000000 --- a/roles/build-python-sdist/defaults/main.yaml +++ /dev/null @@ -1 +0,0 @@ -python_sdist_chdir: "src/{{ zuul.project.canonical_name }}" diff --git a/zuul.yaml b/zuul.yaml index d77fb7114..d31b24817 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -141,12 +141,20 @@ name: python-sdist description: | Build a source tarball and wheel for uploading - run: playbooks/python/sdist.yaml + DEPRECATED. Build a source tarball and a bdist wheel for uploading. + run: playbooks/python/release.yaml + post-run: playbooks/python/tarball-post.yaml + +- job: + name: build-python-release + description: | + Build a source tarball and a bdist wheel for uploading. + run: playbooks/python/release.yaml post-run: playbooks/python/tarball-post.yaml - job: name: python-upload-pypi - parent: python-sdist + parent: build-python-release description: | Generate a and upload a python source tarball and binary wheel