Add Tox Metadata Verification Check.
This change adds a new Zuul Job/Check to verify the app metadata.yaml file in this repo. The check is performed by a console script belonging to the sysinv/config repo. The existing metadata.yaml used the at '@' symbol to serve as a template for logic in the Rules file to find and replace for debian packaging purposes. This needed to be changed so the verification software could read the file without throwing an error. Test Plan: PASS - Verify that the appropriate Zuul Job has run and passes. Story: 2010929 Task: 49230 Change-Id: I0b53dda13ed92eee66f0e71d609fbc6b5e563bd6 Signed-off-by: Reed, Joshua <Joshua.Reed@windriver.com>
This commit is contained in:
parent
89ee77c730
commit
bad6dacfe2
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
|||||||
.tox
|
.tox
|
||||||
|
venv/
|
21
.zuul.yaml
21
.zuul.yaml
@ -5,11 +5,13 @@
|
|||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- k8sapp-dell-storage-tox-py39
|
- k8sapp-dell-storage-tox-py39
|
||||||
- k8sapp-dell-storage-tox-pylint
|
- k8sapp-dell-storage-tox-pylint
|
||||||
|
- k8sapp-dell-storage-tox-metadata
|
||||||
gate:
|
gate:
|
||||||
jobs:
|
jobs:
|
||||||
- openstack-tox-linters
|
- openstack-tox-linters
|
||||||
- k8sapp-dell-storage-tox-py39
|
- k8sapp-dell-storage-tox-py39
|
||||||
- k8sapp-dell-storage-tox-pylint
|
- k8sapp-dell-storage-tox-pylint
|
||||||
|
- k8sapp-dell-storage-tox-metadata
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: k8sapp-dell-storage-tox-py39
|
name: k8sapp-dell-storage-tox-py39
|
||||||
@ -29,6 +31,25 @@
|
|||||||
tox_extra_args: -c python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini
|
tox_extra_args: -c python3-k8sapp-dell-storage/k8sapp_dell_storage/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-dell-storage-tox-metadata
|
||||||
|
parent: tox
|
||||||
|
description: |
|
||||||
|
Run metadata test for k8sapp_dell_storage
|
||||||
|
nodeset: debian-bullseye
|
||||||
|
required-projects:
|
||||||
|
- starlingx/config
|
||||||
|
- starlingx/fault
|
||||||
|
- starlingx/update
|
||||||
|
- starlingx/utilities
|
||||||
|
- starlingx/root
|
||||||
|
files:
|
||||||
|
- python3-k8sapp-dell-storage/*
|
||||||
|
vars:
|
||||||
|
tox_envlist: metadata
|
||||||
|
tox_extra_args: -c python3-k8sapp-dell-storage/k8sapp_dell_storage/tox.ini
|
||||||
|
tox_constraints_file: '{{ ansible_user_dir }}/src/opendev.org/starlingx/root/build-tools/requirements/debian/upper-constraints.txt'
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: k8sapp-dell-storage-tox-pylint
|
name: k8sapp-dell-storage-tox-pylint
|
||||||
parent: tox
|
parent: tox
|
||||||
|
@ -1,4 +1,3 @@
|
|||||||
[DEFAULT]
|
[DEFAULT]
|
||||||
test_path=./k8sapp_dell_storage/tests
|
test_path=./k8sapp_dell_storage/tests
|
||||||
top_dir=./k8sapp_dell_storage
|
top_dir=./k8sapp_dell_storage
|
||||||
#parallel_class=True
|
|
||||||
|
@ -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} \
|
||||||
@ -179,3 +180,11 @@ commands =
|
|||||||
deps = pip_missing_reqs
|
deps = pip_missing_reqs
|
||||||
-rrequirements.txt
|
-rrequirements.txt
|
||||||
commands=pip-missing-reqs -d --ignore-file=/k8sapp_dell_storage/tests k8sapp_dell_storage
|
commands=pip-missing-reqs -d --ignore-file=/k8sapp_dell_storage/tests k8sapp_dell_storage
|
||||||
|
|
||||||
|
[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"
|
@ -27,9 +27,9 @@ override_dh_auto_build:
|
|||||||
cp $(HELM_FOLDER)/*.tgz $(STAGING)/charts
|
cp $(HELM_FOLDER)/*.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,6 +1,6 @@
|
|||||||
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
|
||||||
maintain_user_overrides: true
|
maintain_user_overrides: true
|
||||||
maintain_attributes: true
|
maintain_attributes: true
|
||||||
|
|
||||||
|
4
tox.ini
4
tox.ini
@ -29,6 +29,10 @@ description = Dummy environment to allow flake8 to be run in subdir tox
|
|||||||
basepython = python3
|
basepython = python3
|
||||||
description = Dummy environment to allow pylint to be run in subdir tox
|
description = Dummy environment to allow pylint to be run in subdir tox
|
||||||
|
|
||||||
|
[testenv:metadata]
|
||||||
|
basepython = python3
|
||||||
|
description = Dummy environment to allow pylint to be run in subdir tox
|
||||||
|
|
||||||
[testenv:bandit]
|
[testenv:bandit]
|
||||||
basepython = python3
|
basepython = python3
|
||||||
description = Dummy environment to allow bandit to be run in subdir tox
|
description = Dummy environment to allow bandit to be run in subdir tox
|
||||||
|
Loading…
Reference in New Issue
Block a user