Add status check tox env and zuul job

This patch ensures that the status check tool is run in CI when changes
are made so that we can properly validate the changes and see the
example output.

Change-Id: Ide20064713e54638661b779e371ee9dbbdff1634
This commit is contained in:
Colleen Murphy 2018-11-09 11:51:24 +01:00
parent 27a8a74257
commit 63eee60d82
4 changed files with 38 additions and 0 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
.testrepository
.tox
.venv
html

View File

@ -1,7 +1,26 @@
- job:
name: rpm-packaging-status
parent: tox
success-url: html/
post-run: playbooks/rpm-packaging-status/post.yaml
vars:
tox_envlist: status
tox_environment:
RELEASES: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/releases'].src_dir }}"
RPM_PACKAGING: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/rpm-packaging'].src_dir }}"
REQUIREMENTS: "{{ ansible_user_dir}}/{{ zuul.projects['git.openstack.org/openstack/requirements'].src_dir }}"
RELEASE: stein
required-projects:
- openstack/releases
- openstack/rpm-packaging
- openstack/requirements
- project:
check:
jobs:
- openstack-tox-pep8
- rpm-packaging-status
gate:
jobs:
- openstack-tox-pep8
- rpm-packaging-status

View File

@ -0,0 +1,8 @@
- hosts: all
tasks:
- name: Collect build html
synchronize:
dest: "{{ zuul.executor.log_root }}"
mode: pull
src: "{{ zuul.project.src_dir }}/html"
verify_host: true

10
tox.ini
View File

@ -21,3 +21,13 @@ exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
[testenv:venv]
basepython = python3
commands = {posargs}
[testenv:status]
basepython = python3
whitelist_externals =
mkdir
bash
passenv = RELEASES RPM_PACKAGING REQUIREMENTS RELEASE
commands =
mkdir -p html
bash -c 'python tools/rpm-packaging-status.py --format html $RELEASES $RPM_PACKAGING $REQUIREMENTS $RELEASE > html/index.html'