diff --git a/.zuul.yaml b/.zuul.yaml index 06369d6..6a733fd 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -30,7 +30,7 @@ vars: tox_envlist: py39 python_version: 3.9 - tox_extra_args: -c python-k8sapp-portieris/k8sapp_portieris/tox.ini + tox_extra_args: -c python3-k8sapp-portieris/k8sapp_portieris/tox.ini - job: name: stx-portieris-armada-app-upload-git-mirror @@ -57,10 +57,10 @@ - starlingx/update - starlingx/utilities files: - - python-k8sapp-portieris/* + - python3-k8sapp-portieris/* vars: tox_envlist: pylint - tox_extra_args: -c python-k8sapp-portieris/k8sapp_portieris/tox.ini + tox_extra_args: -c python3-k8sapp-portieris/k8sapp_portieris/tox.ini - secret: name: stx-portieris-armada-app-github-secret diff --git a/centos_build_layer.cfg b/centos_build_layer.cfg deleted file mode 100644 index c581999..0000000 --- a/centos_build_layer.cfg +++ /dev/null @@ -1 +0,0 @@ -flock diff --git a/centos_iso_image.inc b/centos_iso_image.inc deleted file mode 100644 index 02e7757..0000000 --- a/centos_iso_image.inc +++ /dev/null @@ -1 +0,0 @@ -stx-portieris-helm diff --git a/centos_pkg_dirs b/centos_pkg_dirs deleted file mode 100644 index b0e93f4..0000000 --- a/centos_pkg_dirs +++ /dev/null @@ -1,3 +0,0 @@ -portieris-helm -stx-portieris-helm -python-k8sapp-portieris diff --git a/centos_pkg_dirs_containers b/centos_pkg_dirs_containers deleted file mode 100644 index b0e93f4..0000000 --- a/centos_pkg_dirs_containers +++ /dev/null @@ -1,3 +0,0 @@ -portieris-helm -stx-portieris-helm -python-k8sapp-portieris diff --git a/centos_stable_docker_images.inc b/centos_stable_docker_images.inc deleted file mode 100644 index 8aebb53..0000000 --- a/centos_stable_docker_images.inc +++ /dev/null @@ -1 +0,0 @@ -portieris-helm diff --git a/centos_tarball-dl.lst b/centos_tarball-dl.lst deleted file mode 100644 index 8c5bd1f..0000000 --- a/centos_tarball-dl.lst +++ /dev/null @@ -1 +0,0 @@ -portieris-0.13.1.tgz#portieris#https://github.com/IBM/portieris/archive/refs/tags/v0.13.1.tar.gz#http## diff --git a/debian_pkg_dirs b/debian_pkg_dirs index b0e93f4..d7b2b1b 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,3 +1,3 @@ portieris-helm +python3-k8sapp-portieris stx-portieris-helm -python-k8sapp-portieris diff --git a/portieris-helm/centos/build_srpm.data b/portieris-helm/centos/build_srpm.data deleted file mode 100644 index cd85e15..0000000 --- a/portieris-helm/centos/build_srpm.data +++ /dev/null @@ -1,10 +0,0 @@ -TAR_NAME=portieris -VERSION=0.7.0 -TAR="$TAR_NAME-$VERSION.tgz" - -COPY_LIST="${CGCS_BASE}/downloads/$TAR $PKG_BASE/files/* " - -OPT_DEP_LIST="$STX_BASE/portieris-armada-app/stx-portieris-helm" - -TIS_PATCH_VER=PKG_GITREVCOUNT - diff --git a/portieris-helm/centos/portieris-helm.spec b/portieris-helm/centos/portieris-helm.spec deleted file mode 100644 index 7fcf179..0000000 --- a/portieris-helm/centos/portieris-helm.spec +++ /dev/null @@ -1,76 +0,0 @@ -# Application tunables (maps to metadata) -%global app_name stx-portieris -%global helm_repo starlingx -#%global helm_folder /usr/lib/helm -#%global armada_folder /usr/lib/armada -#%global app_folder /usr/local/share/applications/helm - -# Install location -%global app_folder /usr/local/share/applications/helm - -# Build variables -%global helm_folder /usr/lib/helm - -Summary: StarlingX portieris Helm charts -Name: portieris-helm -Version: 0.7.0 -Release: %{tis_patch_ver}%{?_tis_dist} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown - -Source0: portieris-%{version}.tgz -Source1: repositories.yaml -Source2: index.yaml - -BuildArch: noarch - -Patch01: 0001-Squash-required-portieris-fixes.patch -Patch02: 0002-add-image-pull-secrets-to-images.patch -Patch03: 0003-add-toggle-to-reinstall-the-admission-webhook.patch -Patch04: 0004-run-admission-webhooks-as-non-root.patch -Patch05: 0005-add-toleration.patch - -BuildRequires: helm -BuildRequires: chartmuseum - -%description -StarlingX portieris charts - -%prep -%setup -n portieris -%patch01 -p1 -%patch02 -p1 -%patch03 -p1 -%patch04 -p1 -%patch05 -p1 - -%build -# Host a server for the charts -chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." & -sleep 2 -helm repo add local http://localhost:8879/charts - - -# Create a chart tarball compliant with sysinv kube-app.py -%define app_staging %{_builddir}/staging -%define app_tarball portieris-%{version}.tgz - -# Make the charts. These produce a tgz file -make helm.package -cd %{_builddir}/portieris -tar -xvf %{app_tarball} -tar -zcf %{app_tarball} portieris -cd - - -# Terminate helm server (the last backgrounded task) -kill %1 - -%install -install -d -m 755 ${RPM_BUILD_ROOT}%{helm_folder} -install -p -D -m 755 %{_builddir}/portieris/%{app_tarball} ${RPM_BUILD_ROOT}%{helm_folder} - -%files -%defattr(-,root,root,-) -%{helm_folder}/* diff --git a/portieris-helm/centos/portieris.stable_docker_image b/portieris-helm/centos/portieris.stable_docker_image deleted file mode 100644 index 0bba1fc..0000000 --- a/portieris-helm/centos/portieris.stable_docker_image +++ /dev/null @@ -1,5 +0,0 @@ -BUILDER=docker -LABEL=portieris -DOCKER_REPO=https://github.com/IBM/portieris.git -DOCKER_REF=0.7.0 -DOCKER_PATCHES="../files/0001-Squash-required-portieris-fixes.patch" diff --git a/python-k8sapp-portieris/centos/build_srpm.data b/python-k8sapp-portieris/centos/build_srpm.data deleted file mode 100644 index d4d1828..0000000 --- a/python-k8sapp-portieris/centos/build_srpm.data +++ /dev/null @@ -1,8 +0,0 @@ -SRC_DIR="k8sapp_portieris" - -OPT_DEP_LIST="$STX_BASE/portieris-armada-app/stx-portieris-helm" - -# Keep the SRCREV in sync with stx-portieris-helm so the app version is the -# same as the plugin version -TIS_BASE_SRCREV=b6f2024cc2c31f7562a31aebc46f0bc490bde6f6 -TIS_PATCH_VER=GITREVCOUNT diff --git a/python-k8sapp-portieris/centos/python-k8sapp-portieris.spec b/python-k8sapp-portieris/centos/python-k8sapp-portieris.spec deleted file mode 100644 index ab97147..0000000 --- a/python-k8sapp-portieris/centos/python-k8sapp-portieris.spec +++ /dev/null @@ -1,52 +0,0 @@ -%global app_name portieris -%global pypi_name k8sapp-portieris -%global sname k8sapp_portieris - -Name: python-%{pypi_name} -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -Summary: StarlingX sysinv extensions: Portieris - -License: Apache-2.0 -Source0: %{name}-%{version}.tar.gz - -BuildArch: noarch - -BuildRequires: python-setuptools -BuildRequires: python-pbr -BuildRequires: python2-pip -BuildRequires: python2-wheel - -%description -StarlingX sysinv extensions: Portieris K8S app - -%prep -%setup -# Remove bundled egg-info -rm -rf %{pypi_name}.egg-info - -%build -export PBR_VERSION=%{version} -%{__python2} setup.py build - -%py2_build_wheel - -%install -export PBR_VERSION=%{version}.%{tis_patch_ver} -export SKIP_PIP_INSTALL=1 -%{__python2} setup.py install --skip-build --root %{buildroot} -mkdir -p ${RPM_BUILD_ROOT}/plugins/%{app_name} -install -m 644 dist/*.whl ${RPM_BUILD_ROOT}/plugins/%{app_name}/ - -%files -%{python2_sitelib}/%{sname} -%{python2_sitelib}/%{sname}-*.egg-info - -%package wheels -Summary: %{name} wheels - -%description wheels -Contains python wheels for %{name} - -%files wheels -/plugins/* diff --git a/python-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris-wheels.install b/python-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris-wheels.install deleted file mode 100644 index eaf8a0d..0000000 --- a/python-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris-wheels.install +++ /dev/null @@ -1 +0,0 @@ -plugins/portieris/*.whl diff --git a/python-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris.install b/python-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris.install deleted file mode 100644 index b3e25da..0000000 --- a/python-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/python3/dist-packages/k8sapp_portieris-1.0.0.egg-info/* -usr/lib/python3/dist-packages/k8sapp_portieris/* diff --git a/python-k8sapp-portieris/debian/deb_folder/rules b/python-k8sapp-portieris/debian/deb_folder/rules deleted file mode 100755 index 8669053..0000000 --- a/python-k8sapp-portieris/debian/deb_folder/rules +++ /dev/null @@ -1,26 +0,0 @@ -#!/usr/bin/make -f -# export DH_VERBOSE = 1 - -export APP_NAME=portieris -export PBR_VERSION=1.0.0 -export PYBUILD_NAME=k8sapp-portieris -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 diff --git a/python-k8sapp-portieris/debian/meta_data.yaml b/python-k8sapp-portieris/debian/meta_data.yaml deleted file mode 100644 index 3fce5f7..0000000 --- a/python-k8sapp-portieris/debian/meta_data.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -debname: python3-k8sapp-portieris -debver: 1.0-1 -src_path: k8sapp_portieris -revision: - dist: $STX_DIST - PKG_GITREVCOUNT: true diff --git a/python-k8sapp-portieris/debian/deb_folder/changelog b/python3-k8sapp-portieris/debian/deb_folder/changelog similarity index 100% rename from python-k8sapp-portieris/debian/deb_folder/changelog rename to python3-k8sapp-portieris/debian/deb_folder/changelog diff --git a/python-k8sapp-portieris/debian/deb_folder/control b/python3-k8sapp-portieris/debian/deb_folder/control similarity index 100% rename from python-k8sapp-portieris/debian/deb_folder/control rename to python3-k8sapp-portieris/debian/deb_folder/control diff --git a/python-k8sapp-portieris/debian/deb_folder/copyright b/python3-k8sapp-portieris/debian/deb_folder/copyright similarity index 100% rename from python-k8sapp-portieris/debian/deb_folder/copyright rename to python3-k8sapp-portieris/debian/deb_folder/copyright diff --git a/python3-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris-wheels.install b/python3-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris-wheels.install new file mode 100644 index 0000000..19a9e4c --- /dev/null +++ b/python3-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris-wheels.install @@ -0,0 +1 @@ +plugins/*.whl diff --git a/python3-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris.install b/python3-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris.install new file mode 100644 index 0000000..91d1d9d --- /dev/null +++ b/python3-k8sapp-portieris/debian/deb_folder/python3-k8sapp-portieris.install @@ -0,0 +1 @@ +usr/lib/python3/dist-packages/k8sapp_* diff --git a/python3-k8sapp-portieris/debian/deb_folder/rules b/python3-k8sapp-portieris/debian/deb_folder/rules new file mode 100755 index 0000000..5c63b00 --- /dev/null +++ b/python3-k8sapp-portieris/debian/deb_folder/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export APP_NAME = portieris +export PYBUILD_NAME = k8sapp-portieris + +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 diff --git a/python-k8sapp-portieris/debian/deb_folder/source/format b/python3-k8sapp-portieris/debian/deb_folder/source/format similarity index 100% rename from python-k8sapp-portieris/debian/deb_folder/source/format rename to python3-k8sapp-portieris/debian/deb_folder/source/format diff --git a/python3-k8sapp-portieris/debian/meta_data.yaml b/python3-k8sapp-portieris/debian/meta_data.yaml new file mode 100644 index 0000000..7db8381 --- /dev/null +++ b/python3-k8sapp-portieris/debian/meta_data.yaml @@ -0,0 +1,9 @@ +--- +debname: python3-k8sapp-portieris +debver: 1.0-1 +src_path: k8sapp_portieris +revision: + dist: $STX_DIST + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/portieris-armada-app + BASE_SRCREV: b6f2024cc2c31f7562a31aebc46f0bc490bde6f6 diff --git a/python-k8sapp-portieris/k8sapp_portieris/.gitignore b/python3-k8sapp-portieris/k8sapp_portieris/.gitignore similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/.gitignore rename to python3-k8sapp-portieris/k8sapp_portieris/.gitignore diff --git a/python-k8sapp-portieris/k8sapp_portieris/.stestr.conf b/python3-k8sapp-portieris/k8sapp_portieris/.stestr.conf similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/.stestr.conf rename to python3-k8sapp-portieris/k8sapp_portieris/.stestr.conf diff --git a/python-k8sapp-portieris/k8sapp_portieris/LICENSE b/python3-k8sapp-portieris/k8sapp_portieris/LICENSE similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/LICENSE rename to python3-k8sapp-portieris/k8sapp_portieris/LICENSE diff --git a/python-k8sapp-portieris/k8sapp_portieris/README.rst b/python3-k8sapp-portieris/k8sapp_portieris/README.rst similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/README.rst rename to python3-k8sapp-portieris/k8sapp_portieris/README.rst diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/__init__.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/__init__.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/__init__.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/__init__.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/common/__init__.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/common/__init__.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/common/__init__.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/common/__init__.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/common/constants.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/common/constants.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/common/constants.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/common/constants.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/__init__.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/__init__.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/__init__.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/__init__.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/portieris.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/portieris.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/portieris.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/portieris.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/portieris_certs.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/portieris_certs.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/portieris_certs.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/portieris_certs.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/psp_rolebinding.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/psp_rolebinding.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/psp_rolebinding.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/helm/psp_rolebinding.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/lifecycle/__init__.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/lifecycle/__init__.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/lifecycle/__init__.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/lifecycle/__init__.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/lifecycle/lifecycle_portieris.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/lifecycle/lifecycle_portieris.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/lifecycle/lifecycle_portieris.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/lifecycle/lifecycle_portieris.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/tests/__init__.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/tests/__init__.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/tests/__init__.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/tests/__init__.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/tests/test_plugins.py b/python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/tests/test_plugins.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/tests/test_plugins.py rename to python3-k8sapp-portieris/k8sapp_portieris/k8sapp_portieris/tests/test_plugins.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/pylint.rc b/python3-k8sapp-portieris/k8sapp_portieris/pylint.rc similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/pylint.rc rename to python3-k8sapp-portieris/k8sapp_portieris/pylint.rc diff --git a/python-k8sapp-portieris/k8sapp_portieris/requirements.txt b/python3-k8sapp-portieris/k8sapp_portieris/requirements.txt similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/requirements.txt rename to python3-k8sapp-portieris/k8sapp_portieris/requirements.txt diff --git a/python-k8sapp-portieris/k8sapp_portieris/setup.cfg b/python3-k8sapp-portieris/k8sapp_portieris/setup.cfg similarity index 98% rename from python-k8sapp-portieris/k8sapp_portieris/setup.cfg rename to python3-k8sapp-portieris/k8sapp_portieris/setup.cfg index e43a453..c2a8706 100644 --- a/python-k8sapp-portieris/k8sapp_portieris/setup.cfg +++ b/python3-k8sapp-portieris/k8sapp_portieris/setup.cfg @@ -40,5 +40,5 @@ systemconfig.helm_plugins.portieris = systemconfig.app_lifecycle = portieris = k8sapp_portieris.lifecycle.lifecycle_portieris:PortierisAppLifecycleOperator -[wheel] +[bdist_wheel] universal = 1 diff --git a/python-k8sapp-portieris/k8sapp_portieris/setup.py b/python3-k8sapp-portieris/k8sapp_portieris/setup.py similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/setup.py rename to python3-k8sapp-portieris/k8sapp_portieris/setup.py diff --git a/python-k8sapp-portieris/k8sapp_portieris/test-requirements.txt b/python3-k8sapp-portieris/k8sapp_portieris/test-requirements.txt similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/test-requirements.txt rename to python3-k8sapp-portieris/k8sapp_portieris/test-requirements.txt diff --git a/python-k8sapp-portieris/k8sapp_portieris/tox.ini b/python3-k8sapp-portieris/k8sapp_portieris/tox.ini similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/tox.ini rename to python3-k8sapp-portieris/k8sapp_portieris/tox.ini diff --git a/python-k8sapp-portieris/k8sapp_portieris/upper-constraints.txt b/python3-k8sapp-portieris/k8sapp_portieris/upper-constraints.txt similarity index 100% rename from python-k8sapp-portieris/k8sapp_portieris/upper-constraints.txt rename to python3-k8sapp-portieris/k8sapp_portieris/upper-constraints.txt diff --git a/stx-portieris-helm/centos/build_srpm.data b/stx-portieris-helm/centos/build_srpm.data deleted file mode 100644 index 830a7b7..0000000 --- a/stx-portieris-helm/centos/build_srpm.data +++ /dev/null @@ -1,15 +0,0 @@ -SRC_DIR="stx-portieris-helm" - -# This should match python-k8sapp-portieris TIS_BASE_SRCREV -# so that app and plugins are versioned the same -TIS_BASE_SRCREV=b6f2024cc2c31f7562a31aebc46f0bc490bde6f6 -TIS_PATCH_VER=GITREVCOUNT - -COPY_LIST_TO_TAR="\ - $STX_BASE/helm-charts/psp-rolebinding/psp-rolebinding/helm-charts \ -" - -OPT_DEP_LIST="\ - $STX_BASE/portieris-armada-app/python-k8sapp-portieris \ - $STX_BASE/portieris-armada-app/portieris-helm \ -" diff --git a/stx-portieris-helm/centos/stx-portieris-helm.spec b/stx-portieris-helm/centos/stx-portieris-helm.spec deleted file mode 100644 index 81eef46..0000000 --- a/stx-portieris-helm/centos/stx-portieris-helm.spec +++ /dev/null @@ -1,105 +0,0 @@ -# Application tunables (maps to metadata) -%global app_name portieris -%global helm_repo stx-platform -%global helm_folder /usr/lib/helm -%global app_folder /usr/local/share/applications/helm -%global toolkit_version 0.1.0 -%global helmchart_version 0.1.0 - - -Summary: StarlingX Portieris FluxCD Helm Charts -Name: stx-portieris-helm -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown - -Source0: %{name}-%{version}.tar.gz - -# psp-rolebinding source from stx/helm-charts/psp-rolebinding -# plugins source from stx/portieris-armada-app/python-k8sapp-portieris -# portieris-certs sources is in SRC_DIR already - -BuildArch: noarch - -BuildRequires: helm -BuildRequires: chartmuseum -BuildRequires: portieris-helm -BuildRequires: python-k8sapp-portieris -BuildRequires: python-k8sapp-portieris-wheels - -%description -StarlingX Portieris FluxCD Helm Charts - -%prep -%setup - -%build -# Host a server for the charts -chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." & -sleep 2 -helm repo add local http://localhost:8879/charts - -# Make the charts. These produce a tgz file -cd helm-charts -helm lint portieris-certs -helm package portieris-certs - -# psp-rolebinding source is copied by the function of build_srpm.data -# COPY_LIST_TO_TAR -make psp-rolebinding - -# switch back to source root -cd - - -# terminate helm server (the last backgrounded task) -kill %1 - -# Create a chart tarball compliant with sysinv kube-app.py -%define app_staging %{_builddir}/staging -%define app_tarball_fluxcd %{app_name}-%{version}-%{tis_patch_ver}.tgz - -# Setup staging -mkdir -p %{app_staging} -cp files/metadata.yaml %{app_staging} -mkdir -p %{app_staging}/charts - -# copy portieris-certs, psp-rolebinding charts -cp helm-charts/*.tgz %{app_staging}/charts - -# copy portieris-helm chart -cp %{helm_folder}/portieris*.tgz %{app_staging}/charts - -# Copy the plugins: installed in the buildroot -mkdir -p %{app_staging}/plugins -cp /plugins/%{app_name}/*.whl %{app_staging}/plugins - -# Populate metadata -sed -i 's/@APP_NAME@/%{app_name}/g' %{app_staging}/metadata.yaml -sed -i 's/@APP_VERSION@/%{version}-%{tis_patch_ver}/g' %{app_staging}/metadata.yaml -sed -i 's/@HELM_REPO@/%{helm_repo}/g' %{app_staging}/metadata.yaml - -# Prepare app_staging for fluxcd package -cp -R fluxcd-manifests %{app_staging}/ - -# calculate checksum of all files in app_staging -cd %{app_staging} -find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 -# package fluxcd app -tar -zcf %{_builddir}/%{app_tarball_fluxcd} -C %{app_staging}/ . - -# switch back to source root -cd - - -# Cleanup staging -rm -fr %{app_staging} - -%install -install -d -m 755 %{buildroot}/%{app_folder} -install -p -D -m 755 %{_builddir}/%{app_tarball_fluxcd} %{buildroot}/%{app_folder} - -%files -%defattr(-,root,root,-) -%{app_folder}/%{app_tarball_fluxcd} diff --git a/stx-portieris-helm/debian/deb_folder/rules b/stx-portieris-helm/debian/deb_folder/rules index 5bec972..1b578a7 100755 --- a/stx-portieris-helm/debian/deb_folder/rules +++ b/stx-portieris-helm/debian/deb_folder/rules @@ -47,7 +47,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 # Prepare staging for fluxcd package cp -R fluxcd-manifests $(STAGING)/ diff --git a/stx-portieris-helm/debian/meta_data.yaml b/stx-portieris-helm/debian/meta_data.yaml index e6f28ea..c353822 100644 --- a/stx-portieris-helm/debian/meta_data.yaml +++ b/stx-portieris-helm/debian/meta_data.yaml @@ -4,7 +4,8 @@ debver: 1.0-1 src_path: stx-portieris-helm src_files: - ${MY_REPO}/stx/helm-charts/psp-rolebinding/psp-rolebinding/helm-charts - revision: dist: $STX_DIST - PKG_GITREVCOUNT: true + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/portieris-armada-app + BASE_SRCREV: b6f2024cc2c31f7562a31aebc46f0bc490bde6f6