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: 49248 Change-Id: I780f94e54a3b24f22dc1065ec9446294c85fcfc6 Signed-off-by: Reed, Joshua <Joshua.Reed@windriver.com>
This commit is contained in:
parent
c2838cac38
commit
9a8fb7e3f4
1
.gitignore
vendored
1
.gitignore
vendored
@ -33,3 +33,4 @@ cover
|
||||
AUTHORS
|
||||
ChangeLog
|
||||
*.sqlite
|
||||
venv/
|
21
.zuul.yaml
21
.zuul.yaml
@ -6,12 +6,14 @@
|
||||
- k8sapp-intel-device-plugins-operator-tox-py39
|
||||
- k8sapp-intel-device-plugins-operator-tox-pylint
|
||||
- k8sapp-intel-device-plugins-operator-tox-flake8
|
||||
- k8sapp-intel-device-plugins-operator-tox-metadata
|
||||
gate:
|
||||
jobs:
|
||||
- openstack-tox-linters
|
||||
- k8sapp-intel-device-plugins-operator-tox-py39
|
||||
- k8sapp-intel-device-plugins-operator-tox-pylint
|
||||
- k8sapp-intel-device-plugins-operator-tox-flake8
|
||||
- k8sapp-intel-device-plugins-operator-tox-metadata
|
||||
|
||||
- job:
|
||||
name: k8sapp-intel-device-plugins-operator-tox-py39
|
||||
@ -32,6 +34,25 @@
|
||||
tox_extra_args: -c python3-k8sapp-intel-device-plugins-operator/k8sapp_intel_device_plugins_operator/tox.ini
|
||||
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||
|
||||
- job:
|
||||
name: k8sapp-intel-device-plugins-operator-tox-metadata
|
||||
parent: tox
|
||||
description: |
|
||||
Run metadata test for k8sapp_intel_device_plugins_operator
|
||||
required-projects:
|
||||
- starlingx/config
|
||||
- starlingx/fault
|
||||
- starlingx/update
|
||||
- starlingx/utilities
|
||||
- starlingx/root
|
||||
nodeset: debian-bullseye
|
||||
files:
|
||||
- python3-k8sapp-intel-device-plugins-operator/*
|
||||
vars:
|
||||
tox_envlist: metadata
|
||||
tox_extra_args: -c python3-k8sapp-intel-device-plugins-operator/k8sapp_intel_device_plugins_operator/tox.ini
|
||||
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||
|
||||
- job:
|
||||
name: k8sapp-intel-device-plugins-operator-tox-pylint
|
||||
parent: tox
|
||||
|
@ -1,5 +1,5 @@
|
||||
[tox]
|
||||
envlist = flake8,py39,pylint
|
||||
envlist = flake8,py39,pylint,metadata
|
||||
minversion = 1.6
|
||||
skipsdist = True
|
||||
|
||||
@ -16,6 +16,7 @@ usedevelop = True
|
||||
# tox is silly... these need to be separated by a newline....
|
||||
allowlist_externals = bash
|
||||
find
|
||||
echo
|
||||
|
||||
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} \
|
||||
@ -178,4 +179,12 @@ commands =
|
||||
# of the requirements.txt files
|
||||
deps = pip_missing_reqs
|
||||
-rrequirements.txt
|
||||
commands=pip-missing-reqs -d --ignore-file=/k8sapp_intel_device_plugins_operator/tests k8sapp_intel_device_plugins_operator
|
||||
commands=pip-missing-reqs -d --ignore-file=/k8sapp_intel_device_plugins_operator/tests k8sapp_intel_device_plugins_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"
|
@ -28,9 +28,9 @@ override_dh_auto_build:
|
||||
cp $(HELM_FOLDER)/*.tgz $(STAGING)/charts
|
||||
|
||||
# Modify metadata.
|
||||
sed -i 's/@APP_NAME@/$(APP_NAME)/g' $(STAGING)/metadata.yaml
|
||||
sed -i 's/@APP_VERSION@/$(APP_VERSION)/g' $(STAGING)/metadata.yaml
|
||||
sed -i 's/@HELM_REPO@/$(HELM_REPO)/g' $(STAGING)/metadata.yaml
|
||||
sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING)/metadata.yaml
|
||||
sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING)/metadata.yaml
|
||||
sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING)/metadata.yaml
|
||||
|
||||
# Copy the plugins: installed in the buildroot
|
||||
mkdir -p $(STAGING)/plugins
|
||||
|
@ -1,6 +1,6 @@
|
||||
app_name: @APP_NAME@
|
||||
app_version: @APP_VERSION@
|
||||
helm_repo: @HELM_REPO@
|
||||
app_name: APP_REPLACE_NAME
|
||||
app_version: APP_REPLACE_VERSION
|
||||
helm_repo: HELM_REPLACE_REPO
|
||||
maintain_user_overrides: true
|
||||
maintain_attributes: true
|
||||
|
||||
|
4
tox.ini
4
tox.ini
@ -49,6 +49,10 @@ description = Dummy environment to allow flake8 to be run in subdir tox
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user