Standardize app configs
Fixed versioning and adjusted some build files to bring them as close to a standard as possible. - Removed centos files - Added version tracking via GITREVCOUNT - Fixed mismatch in plugin name, set to python3-k8sapp-<app> - Standardized plugin debian files (rules, *.install) - Plugin wheels saved to /plugin instead of /plugin/<app> Test Plan: PASS - Build-pkgs -a PASS - Build-image PASS - Install, bootstrap, unlock PASS - app tarball contains wheel file PASS - wheel versioning updated properly Story: 2010542 Task: 47180 Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com> Change-Id: I395466aa60ac3c7253d7871bdb2f4a9437f28354
This commit is contained in:
parent
518a4cc873
commit
b59ff4b18d
@ -26,11 +26,11 @@
|
|||||||
- starlingx/update
|
- starlingx/update
|
||||||
- starlingx/utilities
|
- starlingx/utilities
|
||||||
files:
|
files:
|
||||||
- python-k8sapp-sts-silicom/*
|
- python3-k8sapp-sts-silicom/*
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: py39
|
tox_envlist: py39
|
||||||
python_version: 3.9
|
python_version: 3.9
|
||||||
tox_extra_args: -c python-k8sapp-sts-silicom/k8sapp_sts_silicom/tox.ini
|
tox_extra_args: -c python3-k8sapp-sts-silicom/k8sapp_sts_silicom/tox.ini
|
||||||
- job:
|
- job:
|
||||||
name: stx-app-sts-silicom-upload-git-mirror
|
name: stx-app-sts-silicom-upload-git-mirror
|
||||||
parent: upload-git-mirror
|
parent: upload-git-mirror
|
||||||
@ -55,10 +55,10 @@
|
|||||||
- starlingx/update
|
- starlingx/update
|
||||||
- starlingx/utilities
|
- starlingx/utilities
|
||||||
files:
|
files:
|
||||||
- python-k8sapp-sts-silicom/*
|
- python3-k8sapp-sts-silicom/*
|
||||||
vars:
|
vars:
|
||||||
tox_envlist: pylint
|
tox_envlist: pylint
|
||||||
tox_extra_args: -c python-k8sapp-sts-silicom/k8sapp_sts_silicom/tox.ini
|
tox_extra_args: -c python3-k8sapp-sts-silicom/k8sapp_sts_silicom/tox.ini
|
||||||
|
|
||||||
- secret:
|
- secret:
|
||||||
name: stx-app-sts-silicom-github-secret
|
name: stx-app-sts-silicom-github-secret
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
python-k8sapp-sts-silicom
|
python3-k8sapp-sts-silicom
|
||||||
stx-sts-silicom-helm
|
stx-sts-silicom-helm
|
||||||
|
@ -1 +0,0 @@
|
|||||||
plugins/sts-silicom/*.whl
|
|
@ -1,2 +0,0 @@
|
|||||||
usr/lib/python3/dist-packages/k8sapp_sts_silicom-1.0.0.egg-info/*
|
|
||||||
usr/lib/python3/dist-packages/k8sapp_sts_silicom/*
|
|
@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/make -f
|
|
||||||
# export DH_VERBOSE = 1
|
|
||||||
|
|
||||||
export APP_NAME=sts-silicom
|
|
||||||
export PBR_VERSION=1.0.0
|
|
||||||
export PYBUILD_NAME=k8sapp_sts_silicom
|
|
||||||
export ROOT=$(CURDIR)/debian/tmp
|
|
||||||
export SKIP_PIP_INSTALL=1
|
|
||||||
|
|
||||||
%:
|
|
||||||
dh $@ --with=python3 --buildsystem=pybuild
|
|
||||||
|
|
||||||
override_dh_auto_build:
|
|
||||||
python3 setup.py build
|
|
||||||
|
|
||||||
override_dh_auto_install:
|
|
||||||
python3 setup.py install --install-layout=deb --skip-build --root $(ROOT)
|
|
||||||
python3 setup.py bdist_wheel \
|
|
||||||
--universal \
|
|
||||||
-d $(ROOT)/plugins/$(APP_NAME)
|
|
||||||
|
|
||||||
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
|
|
||||||
override_dh_auto_test:
|
|
||||||
# (tbogue) FIXME
|
|
||||||
PYTHONDIR=$(CURDIR) stestr run || true
|
|
||||||
endif
|
|
@ -1,7 +0,0 @@
|
|||||||
---
|
|
||||||
debname: python3-k8sapp-sts-silicom
|
|
||||||
debver: 1.0-1
|
|
||||||
src_path: k8sapp_sts_silicom
|
|
||||||
revision:
|
|
||||||
dist: $STX_DIST
|
|
||||||
PKG_GITREVCOUNT: true
|
|
@ -0,0 +1 @@
|
|||||||
|
plugins/*.whl
|
@ -0,0 +1 @@
|
|||||||
|
usr/lib/python3/dist-packages/k8sapp_*
|
33
python3-k8sapp-sts-silicom/debian/deb_folder/rules
Executable file
33
python3-k8sapp-sts-silicom/debian/deb_folder/rules
Executable file
@ -0,0 +1,33 @@
|
|||||||
|
#!/usr/bin/make -f
|
||||||
|
# export DH_VERBOSE = 1
|
||||||
|
|
||||||
|
export APP_NAME = sts-silicom
|
||||||
|
export PYBUILD_NAME = k8sapp_sts_silicom
|
||||||
|
|
||||||
|
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
||||||
|
export MAJOR = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-')
|
||||||
|
export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.')
|
||||||
|
export PBR_VERSION = $(MAJOR).$(MINOR_PATCH)
|
||||||
|
|
||||||
|
export ROOT = $(CURDIR)/debian/tmp
|
||||||
|
export SKIP_PIP_INSTALL = 1
|
||||||
|
|
||||||
|
%:
|
||||||
|
dh $@ --with=python3 --buildsystem=pybuild
|
||||||
|
|
||||||
|
override_dh_auto_install:
|
||||||
|
env | sort
|
||||||
|
|
||||||
|
python3 setup.py install \
|
||||||
|
--install-layout=deb \
|
||||||
|
--root $(ROOT)
|
||||||
|
|
||||||
|
python3 setup.py bdist_wheel \
|
||||||
|
--universal \
|
||||||
|
-d $(ROOT)/plugins
|
||||||
|
|
||||||
|
override_dh_python3:
|
||||||
|
dh_python3 --shebang=/usr/bin/python3
|
||||||
|
|
||||||
|
override_dh_auto_test:
|
||||||
|
PYTHONDIR=$(CURDIR) stestr run
|
9
python3-k8sapp-sts-silicom/debian/meta_data.yaml
Normal file
9
python3-k8sapp-sts-silicom/debian/meta_data.yaml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
debname: python3-k8sapp-sts-silicom
|
||||||
|
debver: 1.0-1
|
||||||
|
src_path: k8sapp_sts_silicom
|
||||||
|
revision:
|
||||||
|
dist: $STX_DIST
|
||||||
|
GITREVCOUNT:
|
||||||
|
SRC_DIR: ${MY_REPO}/stx/app-sts-silicom
|
||||||
|
BASE_SRCREV: e63bc5371c914c6e0b7de149f3d6bc24bb3b0dc9
|
@ -38,5 +38,5 @@ systemconfig.helm_plugins.sts_silicom =
|
|||||||
systemconfig.app_lifecycle =
|
systemconfig.app_lifecycle =
|
||||||
sts-silicom = k8sapp_sts_silicom.lifecycle.lifecycle_sts_silicom:StsSilicomAppLifecycleOperator
|
sts-silicom = k8sapp_sts_silicom.lifecycle.lifecycle_sts_silicom:StsSilicomAppLifecycleOperator
|
||||||
|
|
||||||
[wheel]
|
[bdist_wheel]
|
||||||
universal = 1
|
universal = 1
|
@ -57,7 +57,7 @@ override_dh_auto_build:
|
|||||||
|
|
||||||
# Copy the plugins: installed in the buildroot
|
# Copy the plugins: installed in the buildroot
|
||||||
mkdir -p $(STAGING)/plugins
|
mkdir -p $(STAGING)/plugins
|
||||||
cp /plugins/$(APP_NAME)/*.whl $(STAGING)/plugins
|
cp /plugins/*.whl $(STAGING)/plugins
|
||||||
|
|
||||||
# Generate checksum file and package the tarball
|
# Generate checksum file and package the tarball
|
||||||
cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
|
cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
|
||||||
|
@ -9,4 +9,6 @@ dl_files:
|
|||||||
md5sum: 472dd45fde1ce0ebb422b0e791f5fe01
|
md5sum: 472dd45fde1ce0ebb422b0e791f5fe01
|
||||||
revision:
|
revision:
|
||||||
dist: $STX_DIST
|
dist: $STX_DIST
|
||||||
PKG_GITREVCOUNT: true
|
GITREVCOUNT:
|
||||||
|
SRC_DIR: ${MY_REPO}/stx/app-sts-silicom
|
||||||
|
BASE_SRCREV: e63bc5371c914c6e0b7de149f3d6bc24bb3b0dc9
|
||||||
|
Loading…
x
Reference in New Issue
Block a user