
This is the initial commit for the app skeleton. - centos files: files related with the infra and docker images - rst files: files with doc about snmp-armada-app - stx-snmp-helm folder: files related with helm charts and the app creation Story: 2008132 Task: 41122 Change-Id: I0c4b9843544228bb04cb26504674134dd0e3ceb8 Signed-off-by: Nicolas Alvarez <nicolas.alvarez@windriver.com>
72 lines
1.6 KiB
RPMSpec
72 lines
1.6 KiB
RPMSpec
# Application tunables (maps to metadata)
|
|
%global app_name snmp
|
|
%global helm_repo stx-platform
|
|
|
|
%global armada_folder /usr/lib/armada
|
|
|
|
# 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 SNMP Armada Helm Charts
|
|
Name: stx-snmp-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: helm-charts-snmp-0-1-0.tar.gz
|
|
|
|
BuildArch: noarch
|
|
|
|
BuildRequires: helm
|
|
|
|
%description
|
|
StarlingX SNMP Helm Charts
|
|
|
|
%prep
|
|
%setup -n helm-charts-snmp-0-1-0-1.0.0
|
|
|
|
%build
|
|
|
|
cd helm-charts
|
|
make
|
|
cd -
|
|
|
|
# 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
|
|
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
|
|
|
|
# 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}/*
|