From 2a957c7f1c7dcb555b6c7b552d593db1782fec03 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Mon, 21 Aug 2017 16:56:29 -0400 Subject: [PATCH] Add non-OpenStack python tarball creation job OpenStack python tarball building is weird and not done in a manner consistent with how other folks do it. Make a job that just runs python setup.py sdist bdist_wheel. Change-Id: I0df77cdd00b9820bad3b9cde75be9e150057a584 --- playbooks/python/sdist.yaml | 3 +++ roles/build-python-sdist/defaults/main.yaml | 1 + roles/build-python-sdist/tasks/main.yaml | 4 ++++ zuul.yaml | 7 +++++++ 4 files changed, 15 insertions(+) create mode 100644 playbooks/python/sdist.yaml create mode 100644 roles/build-python-sdist/defaults/main.yaml create mode 100644 roles/build-python-sdist/tasks/main.yaml diff --git a/playbooks/python/sdist.yaml b/playbooks/python/sdist.yaml new file mode 100644 index 000000000..f157dea3f --- /dev/null +++ b/playbooks/python/sdist.yaml @@ -0,0 +1,3 @@ +- hosts: all + roles: + - build-python-sdist diff --git a/roles/build-python-sdist/defaults/main.yaml b/roles/build-python-sdist/defaults/main.yaml new file mode 100644 index 000000000..484656152 --- /dev/null +++ b/roles/build-python-sdist/defaults/main.yaml @@ -0,0 +1 @@ +python_sdist_chdir: "src/{{ zuul.project.canonical_name }}" diff --git a/roles/build-python-sdist/tasks/main.yaml b/roles/build-python-sdist/tasks/main.yaml new file mode 100644 index 000000000..c428ac15e --- /dev/null +++ b/roles/build-python-sdist/tasks/main.yaml @@ -0,0 +1,4 @@ +- name: Build a tarball and wheel + command: python setup.py sdist bdist_wheel + args: + chdir: "{{ python_sdist_chdir }}" diff --git a/zuul.yaml b/zuul.yaml index 52f2d7e20..b6ff80364 100644 --- a/zuul.yaml +++ b/zuul.yaml @@ -117,6 +117,13 @@ vars: tox_envlist: cover +- job: + name: python-sdist + description: | + Build a source tarball and wheel for uploading + run: playbooks/python/sdist.yaml + post-run: playbooks/python/tarball-post + - job: name: tox-tarball parent: tox