fa9574c146
Applying platform-integ-apps was causing portieris to be removed, because its prefix was stx. Change prefix to portieris to prevent this. Also move portieris helm charts to stx-platform repo, for consistency with other charts. Closes-bug: 1889935 Change-Id: I72c517c2e9ca8561f0e7e120aefed2936282bd82 Signed-off-by: Joseph Richard <joseph.richard@windriver.com>
88 lines
2.3 KiB
RPMSpec
88 lines
2.3 KiB
RPMSpec
# Application tunables (maps to metadata)
|
|
%global app_name portieris
|
|
%global helm_repo stx-platform
|
|
%global helm_folder /usr/lib/helm
|
|
%global armada_folder /usr/lib/armada
|
|
%global app_folder /usr/local/share/applications/helm
|
|
%global toolkit_version 0.1.0
|
|
%global helmchart_version 0.1.0
|
|
|
|
|
|
Summary: StarlingX Portieris Armada Helm Charts
|
|
Name: stx-portieris-helm
|
|
Version: 1.0
|
|
Release: %{tis_patch_ver}%{?_tis_dist}
|
|
License: Apache-2.0
|
|
Group: base
|
|
Packager: Wind River <info@windriver.com>
|
|
URL: unknown
|
|
|
|
Source0: %{name}-%{version}.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: helm
|
|
BuildRequires: chartmuseum
|
|
BuildRequires: portieris-helm
|
|
BuildRequires: python-k8sapp-portieris
|
|
BuildRequires: python-k8sapp-portieris-wheels
|
|
|
|
%description
|
|
StarlingX Portieris Armada 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
|
|
make psp-rolebinding
|
|
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 %{app_name}-%{version}-%{tis_patch_ver}.tgz
|
|
|
|
# Setup staging
|
|
mkdir -p %{app_staging}
|
|
cp files/metadata.yaml %{app_staging}
|
|
cp manifests/*.yaml %{app_staging}
|
|
mkdir -p %{app_staging}/charts
|
|
cp helm-charts/*.tgz %{app_staging}/charts
|
|
cp %{helm_folder}/portieris*.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
|
|
|
|
# package it up
|
|
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
|
|
tar -zcf %{_builddir}/%{app_tarball} -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} %{buildroot}/%{app_folder}
|
|
|
|
%files
|
|
%defattr(-,root,root,-)
|
|
%{app_folder}/*
|