diff --git a/.zuul.yaml b/.zuul.yaml index 18fdc52..397889d 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -28,11 +28,11 @@ - starlingx/update - starlingx/utilities files: - - python-k8sapp-oran-o2/* + - python3-k8sapp-oran-o2/* vars: tox_envlist: py39 python_version: 3.9 - tox_extra_args: -c python-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini + tox_extra_args: -c python3-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini - job: name: k8sapp-oran-o2-tox-pylint @@ -46,10 +46,10 @@ - starlingx/update - starlingx/utilities files: - - python-k8sapp-oran-o2/* + - python3-k8sapp-oran-o2/* vars: tox_envlist: pylint - tox_extra_args: -c python-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini + tox_extra_args: -c python3-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini - job: name: stx-app-oran-o2-upload-git-mirror 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 7c0554a..0000000 --- a/centos_iso_image.inc +++ /dev/null @@ -1 +0,0 @@ -stx-oran-o2-helm diff --git a/centos_pkg_dirs b/centos_pkg_dirs deleted file mode 100644 index 2413e95..0000000 --- a/centos_pkg_dirs +++ /dev/null @@ -1,2 +0,0 @@ -stx-oran-o2-helm -python-k8sapp-oran-o2 diff --git a/centos_pkg_dirs_containers b/centos_pkg_dirs_containers deleted file mode 100644 index 2413e95..0000000 --- a/centos_pkg_dirs_containers +++ /dev/null @@ -1,2 +0,0 @@ -stx-oran-o2-helm -python-k8sapp-oran-o2 diff --git a/centos_tarball-dl.lst b/centos_tarball-dl.lst deleted file mode 100644 index 0947979..0000000 --- a/centos_tarball-dl.lst +++ /dev/null @@ -1 +0,0 @@ -oran-o2-2.0.0.tar.gz#oran-o2#https://github.com/o-ran-sc/pti-o2/archive/2.0.0.tar.gz#http## diff --git a/debian_iso_image.inc b/debian_iso_image.inc index 7c0554a..e409a2c 100644 --- a/debian_iso_image.inc +++ b/debian_iso_image.inc @@ -1 +1,2 @@ +#stx-oran-o2-helm stx-oran-o2-helm diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 9ae9284..4657f8e 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,2 +1,2 @@ -python-k8sapp-oran-o2 +python3-k8sapp-oran-o2 stx-oran-o2-helm diff --git a/python-k8sapp-oran-o2/centos/build_srpm.data b/python-k8sapp-oran-o2/centos/build_srpm.data deleted file mode 100644 index 902604f..0000000 --- a/python-k8sapp-oran-o2/centos/build_srpm.data +++ /dev/null @@ -1,3 +0,0 @@ -SRC_DIR="k8sapp_oran_o2" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/python-k8sapp-oran-o2/centos/python-k8sapp-oran-o2.spec b/python-k8sapp-oran-o2/centos/python-k8sapp-oran-o2.spec deleted file mode 100644 index e7f6db8..0000000 --- a/python-k8sapp-oran-o2/centos/python-k8sapp-oran-o2.spec +++ /dev/null @@ -1,52 +0,0 @@ -%global app_name oran-o2 -%global pypi_name k8sapp-oran-o2 -%global sname k8sapp_oran_o2 - -Name: python-%{pypi_name} -Version: 1.0 -Release: %{tis_patch_ver}%{?_tis_dist} -Summary: StarlingX sysinv extensions: ORAN O2 - -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: ORAN O2 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-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2-wheels.install b/python-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2-wheels.install deleted file mode 100644 index d615b32..0000000 --- a/python-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2-wheels.install +++ /dev/null @@ -1 +0,0 @@ -plugins/oran-o2/*.whl diff --git a/python-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2.install b/python-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2.install deleted file mode 100644 index 50347db..0000000 --- a/python-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/lib/python3/dist-packages/k8sapp_oran_o2-1.0.0.egg-info/* -usr/lib/python3/dist-packages/k8sapp_oran_o2/* diff --git a/python-k8sapp-oran-o2/debian/deb_folder/rules b/python-k8sapp-oran-o2/debian/deb_folder/rules deleted file mode 100755 index 8ab222f..0000000 --- a/python-k8sapp-oran-o2/debian/deb_folder/rules +++ /dev/null @@ -1,24 +0,0 @@ -#!/usr/bin/make -f -# export DH_VERBOSE = 1 - -export APP_NAME=oran-o2 -export PBR_VERSION=1.0.0 -export PYBUILD_NAME=k8sapp_oran_o2 -export ROOT=debian/tmp - -%: - dh $@ --with=python3 --buildsystem=pybuild - -override_dh_auto_install: - python3 setup.py install --install-layout=deb --root $(ROOT) - python3 setup.py bdist_wheel \ - --universal \ - -d $(ROOT)/plugins/$(APP_NAME) - -override_dh_python3: - dh_python3 --shebang=/usr/bin/python3 - -ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) -override_dh_auto_test: - PYTHONDIR=$(CURDIR) stestr run || true -endif diff --git a/python-k8sapp-oran-o2/debian/meta_data.yaml b/python-k8sapp-oran-o2/debian/meta_data.yaml deleted file mode 100644 index fe6bcd0..0000000 --- a/python-k8sapp-oran-o2/debian/meta_data.yaml +++ /dev/null @@ -1,7 +0,0 @@ ---- -debname: python3-k8sapp-oran-o2 -debver: 1.0-1 -src_path: k8sapp_oran_o2 -revision: - dist: $STX_DIST - PKG_GITREVCOUNT: true diff --git a/python-k8sapp-oran-o2/debian/deb_folder/changelog b/python3-k8sapp-oran-o2/debian/deb_folder/changelog similarity index 100% rename from python-k8sapp-oran-o2/debian/deb_folder/changelog rename to python3-k8sapp-oran-o2/debian/deb_folder/changelog diff --git a/python-k8sapp-oran-o2/debian/deb_folder/control b/python3-k8sapp-oran-o2/debian/deb_folder/control similarity index 100% rename from python-k8sapp-oran-o2/debian/deb_folder/control rename to python3-k8sapp-oran-o2/debian/deb_folder/control diff --git a/python-k8sapp-oran-o2/debian/deb_folder/copyright b/python3-k8sapp-oran-o2/debian/deb_folder/copyright similarity index 100% rename from python-k8sapp-oran-o2/debian/deb_folder/copyright rename to python3-k8sapp-oran-o2/debian/deb_folder/copyright diff --git a/python3-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2-wheels.install b/python3-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2-wheels.install new file mode 100644 index 0000000..19a9e4c --- /dev/null +++ b/python3-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2-wheels.install @@ -0,0 +1 @@ +plugins/*.whl diff --git a/python3-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2.install b/python3-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2.install new file mode 100644 index 0000000..91d1d9d --- /dev/null +++ b/python3-k8sapp-oran-o2/debian/deb_folder/python3-k8sapp-oran-o2.install @@ -0,0 +1 @@ +usr/lib/python3/dist-packages/k8sapp_* diff --git a/python3-k8sapp-oran-o2/debian/deb_folder/rules b/python3-k8sapp-oran-o2/debian/deb_folder/rules new file mode 100755 index 0000000..26af7be --- /dev/null +++ b/python3-k8sapp-oran-o2/debian/deb_folder/rules @@ -0,0 +1,33 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export APP_NAME = oran-o2 +export PYBUILD_NAME = k8sapp_oran_o2 + +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-oran-o2/debian/deb_folder/source/format b/python3-k8sapp-oran-o2/debian/deb_folder/source/format similarity index 100% rename from python-k8sapp-oran-o2/debian/deb_folder/source/format rename to python3-k8sapp-oran-o2/debian/deb_folder/source/format diff --git a/python3-k8sapp-oran-o2/debian/meta_data.yaml b/python3-k8sapp-oran-o2/debian/meta_data.yaml new file mode 100644 index 0000000..a14e0ca --- /dev/null +++ b/python3-k8sapp-oran-o2/debian/meta_data.yaml @@ -0,0 +1,9 @@ +--- +debname: python3-k8sapp-oran-o2 +debver: 1.0-1 +src_path: k8sapp_oran_o2 +revision: + dist: $STX_DIST + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/app-oran-o2 + BASE_SRCREV: 49916455ef6c8d6fbee5293424a41c3d11d2eefb diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/.gitignore b/python3-k8sapp-oran-o2/k8sapp_oran_o2/.gitignore similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/.gitignore rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/.gitignore diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/.stestr.conf b/python3-k8sapp-oran-o2/k8sapp_oran_o2/.stestr.conf similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/.stestr.conf rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/.stestr.conf diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/LICENSE b/python3-k8sapp-oran-o2/k8sapp_oran_o2/LICENSE similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/LICENSE rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/LICENSE diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/README.rst b/python3-k8sapp-oran-o2/k8sapp_oran_o2/README.rst similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/README.rst rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/README.rst diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/__init__.py b/python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/__init__.py similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/__init__.py rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/__init__.py diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/common/__init__.py b/python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/common/__init__.py similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/common/__init__.py rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/common/__init__.py diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/common/constants.py b/python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/common/constants.py similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/common/constants.py rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/common/constants.py diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/helm/__init__.py b/python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/helm/__init__.py similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/helm/__init__.py rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/helm/__init__.py diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/helm/oran_o2.py b/python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/helm/oran_o2.py similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/helm/oran_o2.py rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/helm/oran_o2.py diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/__init__.py b/python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/__init__.py similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/__init__.py rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/__init__.py diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/test_oran_o2.py b/python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/test_oran_o2.py similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/test_oran_o2.py rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/test_oran_o2.py diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/test_plugins.py b/python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/test_plugins.py similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/test_plugins.py rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/k8sapp_oran_o2/tests/test_plugins.py diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/pylint.rc b/python3-k8sapp-oran-o2/k8sapp_oran_o2/pylint.rc similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/pylint.rc rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/pylint.rc diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/requirements.txt b/python3-k8sapp-oran-o2/k8sapp_oran_o2/requirements.txt similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/requirements.txt rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/requirements.txt diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/setup.cfg b/python3-k8sapp-oran-o2/k8sapp_oran_o2/setup.cfg similarity index 98% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/setup.cfg rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/setup.cfg index 919096b..a94f1b1 100644 --- a/python-k8sapp-oran-o2/k8sapp_oran_o2/setup.cfg +++ b/python3-k8sapp-oran-o2/k8sapp_oran_o2/setup.cfg @@ -35,5 +35,5 @@ systemconfig.helm_applications = systemconfig.helm_plugins.oran_o2 = 001_oran-o2 = k8sapp_oran_o2.helm.oran_o2:Orano2Helm -[wheel] +[bdist_wheel] universal = 1 diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/setup.py b/python3-k8sapp-oran-o2/k8sapp_oran_o2/setup.py similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/setup.py rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/setup.py diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/test-requirements.txt b/python3-k8sapp-oran-o2/k8sapp_oran_o2/test-requirements.txt similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/test-requirements.txt rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/test-requirements.txt diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini b/python3-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini similarity index 94% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini index 572a185..22bc15f 100644 --- a/python-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini +++ b/python3-k8sapp-oran-o2/k8sapp_oran_o2/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = flake8,py27,py36,py39,pylint,bandit +envlist = flake8,py27,py39,pylint,bandit minversion = 1.6 # disable source dist generation because Zuul fails on setting up # pbr randomly in the sdist step. @@ -25,7 +25,7 @@ allowlist_externals = bash install_command = pip install \ -v -v -v --use-deprecated legacy-resolver \ -c{toxinidir}/upper-constraints.txt \ - -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/stein/upper-constraints.txt} \ + -c{env:UPPER_CONSTRAINTS_FILE:https://opendev.org/openstack/requirements/raw/branch/stable/yoga/upper-constraints.txt} \ {opts} {packages} # Note the hash seed is set to 0 until can be tested with a @@ -72,14 +72,6 @@ commands = stestr run {posargs} stestr slowest -[testenv:py36] -basepython = python3.6 -usedevelop = True -commands = - {[testenv]commands} - stestr run {posargs} - stestr slowest - [testenv:py39] basepython = python3.9 usedevelop = True diff --git a/python-k8sapp-oran-o2/k8sapp_oran_o2/upper-constraints.txt b/python3-k8sapp-oran-o2/k8sapp_oran_o2/upper-constraints.txt similarity index 100% rename from python-k8sapp-oran-o2/k8sapp_oran_o2/upper-constraints.txt rename to python3-k8sapp-oran-o2/k8sapp_oran_o2/upper-constraints.txt diff --git a/stx-oran-o2-helm/centos/build_srpm.data b/stx-oran-o2-helm/centos/build_srpm.data deleted file mode 100644 index 12ec2a1..0000000 --- a/stx-oran-o2-helm/centos/build_srpm.data +++ /dev/null @@ -1,12 +0,0 @@ -SRC_DIR="stx-oran-o2-helm" - -CHART_TAR_NAME=oran-o2 - -FLUXCD_O2_VERSION=2.0.0 -FLUXCD_TAR="$CHART_TAR_NAME-$FLUXCD_O2_VERSION.tar.gz" - -COPY_LIST=" \ - ${CGCS_BASE}/downloads/$FLUXCD_TAR \ -" - -TIS_PATCH_VER=PKG_GITREVCOUNT diff --git a/stx-oran-o2-helm/centos/stx-oran-o2-helm.spec b/stx-oran-o2-helm/centos/stx-oran-o2-helm.spec deleted file mode 100644 index 07b315c..0000000 --- a/stx-oran-o2-helm/centos/stx-oran-o2-helm.spec +++ /dev/null @@ -1,98 +0,0 @@ -# Application tunables (maps to metadata) -%global app_name oran-o2 -%global helm_repo stx-platform -%global fluxcd_o2_version 2.0.0 - -# Install location -%global app_folder /usr/local/share/applications/helm - -# Build variables -%global helm_folder /usr/lib/helm -%global toolkit_version 0.1.0 - -Summary: StarlingX O-ORAN O2 Application FluxCD Helm Charts -Name: stx-oran-o2-helm -Version: 2.0.0 -Release: %{tis_patch_ver}%{?_tis_dist} -License: Apache-2.0 -Group: base -Packager: Wind River -URL: unknown - -Source0: %{name}-%{version}.tar.gz - -Source1: oran-o2-%{fluxcd_o2_version}.tar.gz - -BuildArch: noarch - -BuildRequires: helm -BuildRequires: chartmuseum -BuildRequires: python-k8sapp-oran-o2 -BuildRequires: python-k8sapp-oran-o2-wheels - -%description -StarlingX O-ORAN O2 Application FluxCD Helm Charts - -%prep -%setup -# set up fluxcd tar source -cd %{_builddir} -mkdir -p oran-o2 -/usr/bin/tar -C oran-o2 --strip-components=1 -xvf %{SOURCE1} - -%build -# Host a server for the charts -cd %{_builddir}/oran-o2 -chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." & -sleep 2 -helm repo add local http://localhost:8879/charts - -# Make Chart -mkdir -p %{_builddir}/oran-o2/o2-charts -mv %{_builddir}/oran-o2/charts/* %{_builddir}/oran-o2/o2-charts -mv %{_builddir}/oran-o2/o2-charts %{_builddir}/oran-o2/charts/oran-o2 -cd %{_builddir}/stx-oran-o2-helm-%{version} -cp files/Makefile %{_builddir}/oran-o2/charts -cd %{_builddir}/oran-o2/charts -make oran-o2 - -# 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} -cd %{_builddir}/stx-oran-o2-helm-%{version} -cp files/metadata.yaml %{app_staging} -cp -Rv fluxcd-manifests %{app_staging}/ -mkdir -p %{app_staging}/charts - -cd %{_builddir}/oran-o2 -cp charts/*.tgz %{app_staging}/charts -cd %{app_staging} - -# 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 - -# Copy the plugins: installed in the buildroot -mkdir -p %{app_staging}/plugins -cp /plugins/%{app_name}/*.whl %{app_staging}/plugins - -find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 -tar -zcf %{_builddir}/%{app_tarball_fluxcd} -C %{app_staging}/ . - -# 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-oran-o2-helm/debian/deb_folder/rules b/stx-oran-o2-helm/debian/deb_folder/rules index 390fade..0f8355d 100755 --- a/stx-oran-o2-helm/debian/deb_folder/rules +++ b/stx-oran-o2-helm/debian/deb_folder/rules @@ -6,10 +6,10 @@ export APP_FOLDER = $(ROOT)/usr/local/share/applications/helm 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 2 -d '.') +export MINOR = $(shell echo $(DEB_VERSION) | cut -f 2 -d '.') export APP_NAME = oran-o2 -export APP_VERSION = $(MAJOR).$(MINOR_PATCH) +export APP_VERSION = $(MAJOR).$(MINOR) export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz export HELM_REPO = stx-platform export STAGING_FLUXCD = staging-fluxcd @@ -55,7 +55,7 @@ override_dh_auto_build: # Copy the plugins: installed in the buildroot mkdir -p $(STAGING_FLUXCD)/plugins - cp /plugins/$(APP_NAME)/*.whl $(STAGING_FLUXCD)/plugins + cp /plugins/*.whl $(STAGING_FLUXCD)/plugins cp -R fluxcd-manifests $(STAGING_FLUXCD)/ diff --git a/stx-oran-o2-helm/debian/meta_data.yaml b/stx-oran-o2-helm/debian/meta_data.yaml index 98da266..6ba9683 100644 --- a/stx-oran-o2-helm/debian/meta_data.yaml +++ b/stx-oran-o2-helm/debian/meta_data.yaml @@ -9,4 +9,6 @@ dl_files: md5sum: b9dc448c4dbea0e5ad5f5702319eb24f revision: dist: $STX_DIST - PKG_GITREVCOUNT: true + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/app-oran-o2 + BASE_SRCREV: 49916455ef6c8d6fbee5293424a41c3d11d2eefb