Merge "Tox: add tox job and requirements to improve specfiles"
This commit is contained in:
commit
70c3c91ce5
11
.zuul.yaml
11
.zuul.yaml
@ -11,6 +11,8 @@
|
||||
- openstack-tox-linters
|
||||
- openstack-tox-pep8
|
||||
- stx-fault-build
|
||||
- flock-check-packaging:
|
||||
voting: false
|
||||
gate:
|
||||
jobs:
|
||||
- build-openstack-api-ref
|
||||
@ -56,3 +58,12 @@
|
||||
fault: https://opendev.org/starlingx/fault
|
||||
integ: https://opendev.org/starlingx/integ
|
||||
update: https://opendev.org/starlingx/update
|
||||
|
||||
- job:
|
||||
name: flock-check-packaging
|
||||
parent: tox
|
||||
description: Sanity check RPM spec files
|
||||
required-projects:
|
||||
- name: starlingx/integ
|
||||
vars:
|
||||
tox_envlist: rpm-packaging-lint
|
||||
|
2
bindep.txt
Normal file
2
bindep.txt
Normal file
@ -0,0 +1,2 @@
|
||||
diffutils
|
||||
rpm
|
@ -6,16 +6,16 @@ License: Apache-2.0
|
||||
Group: Development/Tools/Other
|
||||
URL: https://opendev.org/starlingx/fault
|
||||
Source0: %{name}-%{version}.tar.xz
|
||||
BuildRequires: python2-oslo.config
|
||||
BuildRequires: insserv-compat
|
||||
BuildRequires: python-oslo.db
|
||||
BuildRequires: python2-oslo.log
|
||||
BuildRequires: python-oslo.messaging
|
||||
BuildRequires: python-oslo.middleware
|
||||
BuildRequires: python-setuptools
|
||||
BuildRequires: python2-oslo.config
|
||||
BuildRequires: python2-oslo.log
|
||||
BuildRequires: python2-pip
|
||||
BuildRequires: systemd
|
||||
BuildRequires: systemd-rpm-macros
|
||||
BuildRequires: insserv-compat
|
||||
Requires: python-eventlet
|
||||
Requires: python-paste
|
||||
Requires: python-webob
|
||||
|
@ -2,3 +2,4 @@ hacking!=0.13.0,<0.14,>=0.12.0
|
||||
bashate >= 0.2
|
||||
PyYAML >= 3.1.0
|
||||
yamllint >= 0.5.2
|
||||
spec_cleaner>=1.0.9
|
||||
|
22
tox.ini
22
tox.ini
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = linters,pep8
|
||||
envlist = linters,pep8,rpm-packaging-lint
|
||||
minversion = 2.3
|
||||
skipsdist = True
|
||||
|
||||
@ -11,6 +11,26 @@ setenv = VIRTUAL_ENV={envdir}
|
||||
OS_TEST_TIMEOUT=60
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
|
||||
[testenv:rpm-packaging-lint]
|
||||
basepython = python3
|
||||
setenv =
|
||||
VIRTUAL_ENV={envdir}
|
||||
LC_ALL=en_US.utf-8
|
||||
install_command = pip install -U \
|
||||
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \
|
||||
{opts} {packages}
|
||||
deps = -r{toxinidir}/test-requirements.txt
|
||||
whitelist_externals = bash
|
||||
commands =
|
||||
bash -c 'if [ -d {toxinidir}/../integ ]; then integdir={toxinidir}/../integ; \
|
||||
else integdir={toxinidir}/../stx-integ; \
|
||||
fi; \
|
||||
find . \
|
||||
-not \( -type d -name .?\* -prune \) \
|
||||
-not \( -type d -name centos -prune \) \
|
||||
-type f -name \*.spec \
|
||||
-print0 | xargs -0 $integdir/tools/spec-tools/speclint.sh'
|
||||
|
||||
[testenv:linters]
|
||||
basepython = python3
|
||||
whitelist_externals = bash
|
||||
|
Loading…
x
Reference in New Issue
Block a user