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: 47189 Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com> Change-Id: I51029dd2e47265f5a90565e486570faad1e6334d
This commit is contained in:
parent
b0d571a2cb
commit
1e3b82ce2c
|
@ -1 +1,2 @@
|
|||
#stx-security-profiles-operator-helm
|
||||
stx-security-profiles-operator-helm
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
python-k8sapp-security-profiles-operator
|
||||
python3-k8sapp-security-profiles-operator
|
||||
stx-security-profiles-operator-helm
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
plugins/security-profiles-operator/*.whl
|
|
@ -1,2 +0,0 @@
|
|||
usr/lib/python3/dist-packages/k8sapp_security_profiles_operator-1.0.0.egg-info/*
|
||||
usr/lib/python3/dist-packages/k8sapp_security_profiles_operator/*
|
|
@ -1,26 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
export APP_NAME=security-profiles-operator
|
||||
export PBR_VERSION=1.0.0
|
||||
export PYBUILD_NAME=k8sapp_security_profiles_operator
|
||||
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
|
|
@ -0,0 +1 @@
|
|||
plugins/*.whl
|
|
@ -0,0 +1 @@
|
|||
usr/lib/python3/dist-packages/k8sapp_*
|
|
@ -0,0 +1,33 @@
|
|||
#!/usr/bin/make -f
|
||||
#export DH_VERBOSE = 1
|
||||
|
||||
export APP_NAME = security-profiles-operator
|
||||
export PYBUILD_NAME = k8sapp_security_profiles_operator
|
||||
|
||||
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
|
|
@ -4,4 +4,6 @@ debver: 1.0-1
|
|||
src_path: k8sapp_security_profiles_operator
|
||||
revision:
|
||||
dist: $STX_DIST
|
||||
PKG_GITREVCOUNT: true
|
||||
GITREVCOUNT:
|
||||
SRC_DIR: ${MY_REPO}/stx/app-security-profiles-operator
|
||||
BASE_SRCREV: 76d1915efa382c4b731e0e1921f737aef81d9916
|
|
@ -38,5 +38,5 @@ systemconfig.helm_plugins.security_profiles_operator =
|
|||
systemconfig.app_lifecycle =
|
||||
security-profiles-operator = k8sapp_security_profiles_operator.lifecycle.lifecycle_security_profiles_operator:SecurityProfilesOperatorAppLifecycleOperator
|
||||
|
||||
[wheel]
|
||||
[bdist_wheel]
|
||||
universal = 1
|
|
@ -62,7 +62,7 @@ override_dh_auto_build:
|
|||
|
||||
# Copy the plugins: installed in the buildroot
|
||||
mkdir -p $(STAGING)/plugins
|
||||
cp /plugins/$(APP_NAME)/*.whl $(STAGING)/plugins
|
||||
cp /plugins/*.whl $(STAGING)/plugins
|
||||
|
||||
# Generate checksum file and package the tarball
|
||||
cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
|
||||
|
|
|
@ -9,4 +9,6 @@ dl_files:
|
|||
md5sum: 3a24e30d9cf7995ebcf3c036a836ce89
|
||||
revision:
|
||||
dist: $STX_DIST
|
||||
PKG_GITREVCOUNT: true
|
||||
GITREVCOUNT:
|
||||
SRC_DIR: ${MY_REPO}/stx/app-security-profiles-operator
|
||||
BASE_SRCREV: 76d1915efa382c4b731e0e1921f737aef81d9916
|
||||
|
|
Loading…
Reference in New Issue