Update app Zuul Check Jobs.
Modify code to conform to flake8 and pylint. Jobs are now flake8, pylint, py39 and metadata. Test Plan PASS - All zuul jobs pass as expected. Story: 2010929 Task: 49247 Change-Id: If24f07356abbe81ecc417fb6122dfbedf8e02956 Signed-off-by: Reed, Joshua <Joshua.Reed@windriver.com>
This commit is contained in:
parent
d5cf135877
commit
d89bbdc2a1
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
.tox
|
||||||
|
venv/
|
21
.zuul.yaml
21
.zuul.yaml
@ -6,12 +6,14 @@
|
|||||||
- k8sapp-intel-ethernet-operator-tox-py39
|
- k8sapp-intel-ethernet-operator-tox-py39
|
||||||
- k8sapp-intel-ethernet-operator-tox-pylint
|
- k8sapp-intel-ethernet-operator-tox-pylint
|
||||||
- k8sapp-intel-ethernet-operator-tox-flake8
|
- k8sapp-intel-ethernet-operator-tox-flake8
|
||||||
|
- k8sapp-intel-ethernet-operator-tox-metadata
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- k8sapp-intel-ethernet-operator-tox-py39
|
- k8sapp-intel-ethernet-operator-tox-py39
|
||||||
- k8sapp-intel-ethernet-operator-tox-pylint
|
- k8sapp-intel-ethernet-operator-tox-pylint
|
||||||
- k8sapp-intel-ethernet-operator-tox-flake8
|
- k8sapp-intel-ethernet-operator-tox-flake8
|
||||||
|
- k8sapp-intel-ethernet-operator-tox-metadata
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: k8sapp-intel-ethernet-operator-tox-py39
|
name: k8sapp-intel-ethernet-operator-tox-py39
|
||||||
@ -32,6 +34,25 @@
|
|||||||
tox_extra_args: -c python3-k8sapp-intel-ethernet-operator/k8sapp_intel_ethernet_operator/tox.ini
|
tox_extra_args: -c python3-k8sapp-intel-ethernet-operator/k8sapp_intel_ethernet_operator/tox.ini
|
||||||
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: k8sapp-intel-ethernet-operator-tox-metadata
|
||||||
|
parent: tox
|
||||||
|
description: |
|
||||||
|
Run metadata test for k8sapp_intel_ethernet_operator
|
||||||
|
required-projects:
|
||||||
|
- starlingx/config
|
||||||
|
- starlingx/fault
|
||||||
|
- starlingx/update
|
||||||
|
- starlingx/utilities
|
||||||
|
- starlingx/root
|
||||||
|
nodeset: debian-bullseye
|
||||||
|
files:
|
||||||
|
- python3-k8sapp-intel-ethernet-operator/*
|
||||||
|
vars:
|
||||||
|
tox_envlist: metadata
|
||||||
|
tox_extra_args: -c python3-k8sapp-intel-ethernet-operator/k8sapp_intel_ethernet_operator/tox.ini
|
||||||
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: k8sapp-intel-ethernet-operator-tox-pylint
|
name: k8sapp-intel-ethernet-operator-tox-pylint
|
||||||
parent: tox
|
parent: tox
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = flake8,py39,pylint
|
envlist = flake8,py39,pylint,metadata
|
||||||
minversion = 1.6
|
minversion = 1.6
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
@ -16,6 +16,7 @@ usedevelop = True
|
|||||||
# tox is silly... these need to be separated by a newline....
|
# tox is silly... these need to be separated by a newline....
|
||||||
allowlist_externals = bash
|
allowlist_externals = bash
|
||||||
find
|
find
|
||||||
|
echo
|
||||||
|
|
||||||
install_command = pip install -v -v -v \
|
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} \
|
-c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt} \
|
||||||
@ -181,3 +182,11 @@ commands =
|
|||||||
deps = pip_missing_reqs
|
deps = pip_missing_reqs
|
||||||
-rrequirements.txt
|
-rrequirements.txt
|
||||||
commands=pip-missing-reqs -d --ignore-file=/k8sapp_intel_ethernet_operator/tests k8sapp_intel_ethernet_operator
|
commands=pip-missing-reqs -d --ignore-file=/k8sapp_intel_ethernet_operator/tests k8sapp_intel_ethernet_operator
|
||||||
|
|
||||||
|
[testenv:metadata]
|
||||||
|
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}
|
||||||
|
# Pass top level app folder to 'sysinv-app tox' command.
|
||||||
|
commands =
|
||||||
|
bash -c "echo $(dirname $(dirname $(pwd))) | xargs -n 1 sysinv-app tox"
|
@ -32,9 +32,9 @@ override_dh_auto_build:
|
|||||||
cp helm-charts/*.tgz $(STAGING)/charts
|
cp helm-charts/*.tgz $(STAGING)/charts
|
||||||
|
|
||||||
# Populate metadata.
|
# Populate metadata.
|
||||||
sed -i 's/@APP_NAME@/$(APP_NAME)/g' $(STAGING)/metadata.yaml
|
sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING)/metadata.yaml
|
||||||
sed -i 's/@APP_VERSION@/$(APP_VERSION)/g' $(STAGING)/metadata.yaml
|
sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING)/metadata.yaml
|
||||||
sed -i 's/@HELM_REPO@/$(HELM_REPO)/g' $(STAGING)/metadata.yaml
|
sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING)/metadata.yaml
|
||||||
|
|
||||||
# Copy the plugins: installed in the buildroot
|
# Copy the plugins: installed in the buildroot
|
||||||
mkdir -p $(STAGING)/plugins
|
mkdir -p $(STAGING)/plugins
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
maintain_user_overrides: true
|
maintain_user_overrides: true
|
||||||
|
|
||||||
app_name: @APP_NAME@
|
app_name: APP_REPLACE_NAME
|
||||||
app_version: @APP_VERSION@
|
app_version: APP_REPLACE_VERSION
|
||||||
helm_repo: @HELM_REPO@
|
helm_repo: HELM_REPLACE_REPO
|
||||||
|
|
||||||
upgrades:
|
upgrades:
|
||||||
auto_update: true
|
auto_update: true
|
||||||
|
31
tox.ini
31
tox.ini
@ -5,10 +5,10 @@ skipsdist = True
|
|||||||
sitepackages=False
|
sitepackages=False
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
|
basepython = python3
|
||||||
install_command = pip install -U \
|
install_command = pip install -U \
|
||||||
{opts} {packages} \
|
{opts} {packages} \
|
||||||
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt}
|
-c{env:TOX_CONSTRAINTS_FILE:https://opendev.org/starlingx/root/raw/branch/master/build-tools/requirements/debian/upper-constraints.txt}
|
||||||
|
|
||||||
setenv =
|
setenv =
|
||||||
VIRTUAL_ENV={envdir}
|
VIRTUAL_ENV={envdir}
|
||||||
OS_STDOUT_CAPTURE=1
|
OS_STDOUT_CAPTURE=1
|
||||||
@ -21,9 +21,21 @@ deps =
|
|||||||
allowlist_externals =
|
allowlist_externals =
|
||||||
bash
|
bash
|
||||||
|
|
||||||
passenv =
|
[testenv:flake8]
|
||||||
XDG_CACHE_HOME
|
basepython = python3
|
||||||
|
description = Dummy environment to allow flake8 to be run in subdir tox
|
||||||
|
|
||||||
|
[testenv:pylint]
|
||||||
|
basepython = python3
|
||||||
|
description = Dummy environment to allow pylint to be run in subdir tox
|
||||||
|
|
||||||
|
[testenv:metadata]
|
||||||
|
basepython = python3
|
||||||
|
description = Dummy environment to allow sysinv-app to be run in subdir tox
|
||||||
|
|
||||||
|
[testenv:bandit]
|
||||||
|
basepython = python3
|
||||||
|
description = Dummy environment to allow bandit to be run in subdir tox
|
||||||
|
|
||||||
[testenv:bashate]
|
[testenv:bashate]
|
||||||
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
|
# Treat all E* codes as Errors rather than warnings using: -e 'E*'
|
||||||
@ -40,16 +52,3 @@ commands =
|
|||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
commands =
|
commands =
|
||||||
{[testenv:bashate]commands}
|
{[testenv:bashate]commands}
|
||||||
|
|
||||||
[testenv:flake8]
|
|
||||||
basepython = python3
|
|
||||||
description = Dummy environment to allow flake8 to be run in subdir tox
|
|
||||||
|
|
||||||
[testenv:pylint]
|
|
||||||
basepython = python3
|
|
||||||
description = Dummy environment to allow pylint to be run in subdir tox
|
|
||||||
|
|
||||||
[testenv:bandit]
|
|
||||||
basepython = python3
|
|
||||||
description = Dummy environment to allow bandit to be run in subdir tox
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user