add a job to check the metadata for python packages
Change-Id: I4900089d36b114c5a70d8598a9be90a2ab6a73af Signed-off-by: Doug Hellmann <doug@doughellmann.com>
This commit is contained in:
4
playbooks/pti-python-tarball/check.yaml
Normal file
4
playbooks/pti-python-tarball/check.yaml
Normal file
@@ -0,0 +1,4 @@
|
|||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- check-python-release
|
||||||
|
- build-python-release
|
10
roles/check-python-release/README.rst
Normal file
10
roles/check-python-release/README.rst
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
Test building sdist and wheel for Python projects and verify their
|
||||||
|
metadata.
|
||||||
|
|
||||||
|
** Role Variables **
|
||||||
|
|
||||||
|
.. zuul:rolevar:: release_python
|
||||||
|
:default: python
|
||||||
|
|
||||||
|
The python interpreter to use. Set it to "python3" to use python 3,
|
||||||
|
for example.
|
2
roles/check-python-release/defaults/main.yaml
Normal file
2
roles/check-python-release/defaults/main.yaml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
zuul_work_dir: "{{ zuul.project.src_dir }}"
|
||||||
|
release_python: "python"
|
13
roles/check-python-release/tasks/main.yaml
Normal file
13
roles/check-python-release/tasks/main.yaml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
- name: Install docutils for the README check
|
||||||
|
# NOTE(dhellmann): We install this unconstrained because we expect
|
||||||
|
# setuptools to expect the most recent version anyway. We use a
|
||||||
|
# virtualenv to avoid conflicts with system packages due to pip10
|
||||||
|
# and later.
|
||||||
|
pip:
|
||||||
|
name: docutils
|
||||||
|
virtualenv: "{{ zuul_work_dir }}/venv"
|
||||||
|
virtualenv_python: "{{ release_python }}"
|
||||||
|
- name: Check the package metadata and README format
|
||||||
|
command: "{{ zuul_work_dir }}/venv/bin/{{ release_python }} setup.py check --restructuredtext --strict"
|
||||||
|
args:
|
||||||
|
chdir: "{{ zuul_work_dir }}"
|
@@ -224,6 +224,22 @@
|
|||||||
vars:
|
vars:
|
||||||
release_python: python3
|
release_python: python3
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: test-release-openstack-python3
|
||||||
|
parent: base
|
||||||
|
description: |
|
||||||
|
Test building python tarballs / wheels and the packaging metadata.
|
||||||
|
pre-run: playbooks/pti-python-tarball/pre.yaml
|
||||||
|
run: playbooks/pti-python-tarball/check.yaml
|
||||||
|
post-run:
|
||||||
|
- playbooks/pti-python-tarball/post.yaml
|
||||||
|
vars:
|
||||||
|
release_python: python3
|
||||||
|
files:
|
||||||
|
- setup.cfg
|
||||||
|
- setup.py
|
||||||
|
- README.rst
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: publish-openstack-sphinx-docs-base
|
name: publish-openstack-sphinx-docs-base
|
||||||
description: |
|
description: |
|
||||||
|
Reference in New Issue
Block a user