Remove snmp armada application build

As part of Armada deprecation we need to remove all Armada application
builds for all applications that have been migrated to FluxCD.

This patch removes the armada app build from centos and debian.

TEST PLAN:
PASS: Build centos
PASS: Build debian
PASS: rpm has no armada tarball
PASS: deb has no armada tarball
PASS: fluxcd tarball is unchanged

Story: 2009138
Task: 46044

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: I42e9f206b3dc5f7562ac81d95f586bf05b14f0fc
This commit is contained in:
Lucas Cavalcante 2022-08-19 10:31:36 -03:00
parent 60be653152
commit bdea182883
5 changed files with 2 additions and 107 deletions

View File

@ -1,2 +1 @@
stx-snmp-helm
stx-snmp-helm-armada

View File

@ -2,8 +2,6 @@
%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
@ -31,14 +29,6 @@ BuildRequires: python-k8sapp-snmp-wheels
%description
StarlingX SNMP Helm Charts
%package armada
Summary: StarlingX SNMP Armada Helm Charts
Group: base
License: Apache-2.0
%description armada
StarlingX SNMP Armada Helm Charts
%prep
%setup -n helm-charts-snmp-0-1-0-1.0.0
@ -52,18 +42,15 @@ cd -
# Create a chart tarball compliant with sysinv kube-app.py
%define app_staging %{_builddir}/staging
%define app_tarball_armada %{app_name}-armada-%{version}-%{tis_patch_ver}.tgz
%define app_tarball_fluxcd %{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
# Populate metadata
cd %{app_staging}
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
@ -72,17 +59,6 @@ sed -i 's/@HELM_REPO@/%{helm_repo}/g' %{app_staging}/metadata.yaml
mkdir -p %{app_staging}/plugins
cp /plugins/%{app_name}/*.whl %{app_staging}/plugins
# calculate checksum of all files in app_staging
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
# package it up
tar -zcf %{_builddir}/%{app_tarball_armada} -C %{app_staging}/ .
# switch back to source root
cd -
# Prepare app_staging for fluxcd package
rm -f %{app_staging}/snmp_manifest.yaml
cp -R fluxcd-manifests %{app_staging}/
# calculate checksum of all files in app_staging
@ -99,13 +75,8 @@ rm -fr %{app_staging}
%install
install -d -m 755 %{buildroot}/%{app_folder}
install -p -D -m 755 %{_builddir}/%{app_tarball_armada} %{buildroot}/%{app_folder}
install -p -D -m 755 %{_builddir}/%{app_tarball_fluxcd} %{buildroot}/%{app_folder}
%files armada
%defattr(-,root,root,-)
%{app_folder}/%{app_tarball_armada}
%files
%defattr(-,root,root,-)
%{app_folder}/%{app_tarball_fluxcd}

View File

@ -13,5 +13,5 @@ Package: stx-snmp-helm
Section: libs
Architecture: any
Depends: ${misc:Depends}
Description: StarlingX SNMP Armada Helm Charts
This package contains Armada helm charts for the SNMP application.
Description: StarlingX SNMP Helm Charts
This package contains helm FluxCD charts for the SNMP application.

View File

@ -10,10 +10,8 @@ export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 2 -d '.')
export APP_NAME = snmp
export APP_VERSION = $(MAJOR).$(MINOR_PATCH)
export APP_TARBALL_ARMADA = $(APP_NAME)-armada-$(APP_VERSION).tgz
export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz
export HELM_REPO = stx-platform
export STAGING_ARMADA = staging-armada
export STAGING_FLUXCD = staging-fluxcd
%:
@ -27,33 +25,6 @@ override_dh_auto_build:
# Create the TGZ file.
cd helm-charts && make
############
# ARMADA #
############
# Setup the staging directory.
mkdir -p $(STAGING_ARMADA)
cp files/metadata.yaml $(STAGING_ARMADA)
cp manifests/*.yaml $(STAGING_ARMADA)
mkdir -p $(STAGING_ARMADA)/charts
cp helm-charts/*.tgz $(STAGING_ARMADA)/charts
# Populate metadata.
cd $(STAGING_ARMADA)
sed -i 's/@APP_NAME@/$(APP_NAME)/g' $(STAGING_ARMADA)/metadata.yaml
sed -i 's/@APP_VERSION@/$(APP_VERSION)/g' $(STAGING_ARMADA)/metadata.yaml
sed -i 's/@HELM_REPO@/$(HELM_REPO)/g' $(STAGING_ARMADA)/metadata.yaml
# Copy the plugins: installed in the buildroot
mkdir -p $(STAGING_ARMADA)/plugins
cp /plugins/$(APP_NAME)/*.whl $(STAGING_ARMADA)/plugins
# Create the app package.
cd $(STAGING_ARMADA) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
tar cfz $(APP_TARBALL_ARMADA) -C $(STAGING_ARMADA)/ .
# Cleanup staging.
rm -rf $(STAGING_ARMADA)
############
# FLUXCD #
############
@ -85,7 +56,6 @@ override_dh_auto_build:
override_dh_auto_install:
# Install the app tar file.
install -d -m 755 $(APP_FOLDER)
install -p -D -m 755 $(APP_TARBALL_ARMADA) $(APP_FOLDER)
install -p -D -m 755 $(APP_TARBALL_FLUXCD) $(APP_FOLDER)
override_dh_usrlocal:

View File

@ -1,45 +0,0 @@
---
schema: armada/Chart/v1
metadata:
schema: metadata/Document/v1
name: snmp
data:
chart_name: snmp
release: snmp
namespace: kube-system
source:
location: http://172.17.0.1:8080/helm_charts/stx-platform/snmp-1.0.0.tgz
subpath: snmp
type: tar
reference: master
wait:
timeout: 1800
install:
no_hooks: false
upgrade:
no_hooks: false
pre:
delete:
- type: job
labels:
app: snmp
dependencies: []
---
schema: armada/ChartGroup/v1
metadata:
schema: metadata/Document/v1
name: snmp
data:
description: "StarlingX SNMP"
sequenced: false
chart_group:
- snmp
---
schema: armada/Manifest/v1
metadata:
schema: metadata/Document/v1
name: snmp-manifest
data:
release_prefix: ns
chart_groups:
- snmp