diff --git a/.gitignore b/.gitignore index 0d7a13c..f916a45 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ .testrepository .tox .venv +html diff --git a/.zuul.yaml b/.zuul.yaml index 1fd1fe4..44b159c 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -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 diff --git a/playbooks/rpm-packaging-status/post.yaml b/playbooks/rpm-packaging-status/post.yaml new file mode 100644 index 0000000..8b322ad --- /dev/null +++ b/playbooks/rpm-packaging-status/post.yaml @@ -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 diff --git a/tox.ini b/tox.ini index 8b5078f..798ed19 100644 --- a/tox.ini +++ b/tox.ini @@ -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'