Setup for fluxCD app-distributed-cloud repo

This commit is to create the tox and zuul setup for the
app-distributed-cloud repo.

Test Plan:
PASS - Zuul Verified +1

Story: 2011312
Task: 51846

Change-Id: I7a03a6da0bb2951f411fb5a61932cec1095b19d8
Signed-off-by: Hugo Brito <hugo.brito@windriver.com>
This commit is contained in:
Hugo Brito 2025-03-24 15:35:35 -03:00
parent 8441c15f72
commit 7a16b9bdd1
4 changed files with 68 additions and 0 deletions

8
.zuul.yaml Normal file
View File

@ -0,0 +1,8 @@
---
- project:
check:
jobs:
- openstack-tox-linters
gate:
jobs:
- openstack-tox-linters

1
requirements.txt Normal file
View File

@ -0,0 +1 @@
# Nothing

3
test-requirements.txt Normal file
View File

@ -0,0 +1,3 @@
# hacking pulls in flake8
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
bashate >= 0.2 # Apache-2.0

56
tox.ini Normal file
View File

@ -0,0 +1,56 @@
[tox]
envlist = linters
minversion = 4.0
skipsdist = True
sitepackages=False
[testenv]
basepython = python3
usedevelop = True
install_command = pip install -v -v -v \
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
{opts} {packages}
setenv =
VIRTUAL_ENV={envdir}
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_DEBUG=1
OS_LOG_CAPTURE=1
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
allowlist_externals =
bash
passenv =
XDG_CACHE_HOME
[testenv:bashate]
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
commands =
bash -c "find {toxinidir} \
-not \( -type d -name .?\* -prune \) \
-type f \
-not -name \*~ \
-not -name \*.md \
-name \*.sh \
-print0 | xargs -r -n 1 -0 bashate -v \
-e 'E*'"
[testenv:linters]
commands =
{[testenv:bashate]commands}
[testenv:pep8]
description = Dummy environment to allow flake8 to be run in subdir tox
[testenv:pylint]
description = Dummy environment to allow pylint to be run in subdir tox
[testenv:black]
description = Dummy environment to allow black to be run in subdir tox
[testenv:bandit]
description = Dummy environment to allow bandit to be run in subdir tox