Remove auditd 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: deb package has no armada tarball
PASS: rpm package has no armada tarball
PASS: FluxCD tarball is unchanged

Story: 2009138
Task: 46045

Signed-off-by: Lucas Cavalcante <lucasmedeiros.cavalcante@windriver.com>
Change-Id: I4152fa3377a0e1e6b7b155c721b0adf644eba0e6
This commit is contained in:
Lucas Cavalcante 2022-08-19 10:39:30 -03:00
parent ede964b183
commit 140c922aa3
4 changed files with 3 additions and 82 deletions

View File

@ -7,7 +7,6 @@
%global app_name auditd
%global helm_repo stx-platform
%global armada_folder /usr/lib/armada
# Install location
%global app_folder /usr/local/share/applications/helm
@ -36,14 +35,6 @@ BuildRequires: python-k8sapp-auditd-wheels
%description
StarlingX AUDITD Helm Charts
%package armada
Summary: StarlingX Auditd Application Armada Helm Charts
Group: base
License: Apache-2.0
%description armada
StarlingX Auditd Application Armada Helm Charts
%prep
%setup -n %{name}-%{version}
@ -55,16 +46,13 @@ 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/auditd_manifest.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
@ -75,14 +63,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
# package it up
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
tar -zcf %{_builddir}/%{app_tarball_armada} -C %{app_staging}/ .
# package fluxcd
rm -f %{app_staging}/auditd_manifest.yaml
cd -
cp -R fluxcd-manifests %{app_staging}/
# calculate checksum of all files in app_staging
@ -97,15 +77,9 @@ 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}
install -m 644 -p -D files/auditd.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/auditd.logrotate
%files armada
%defattr(-,root,root,-)
%{app_folder}/%{app_tarball_armada}
%{_sysconfdir}/logrotate.d/auditd.logrotate
%files
%defattr(-,root,root,-)
%{app_folder}/%{app_tarball_fluxcd}

View File

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

View File

@ -11,7 +11,6 @@ export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 2 -d '.')
export APP_NAME = auditd
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 = staging
@ -25,7 +24,6 @@ override_dh_auto_build:
# Setup the staging directory.
mkdir -p $(STAGING)
cp files/metadata.yaml $(STAGING)
cp manifests/auditd_manifest.yaml $(STAGING)
mkdir -p $(STAGING)/charts
cp helm-charts/*.tgz $(STAGING)/charts
@ -38,12 +36,7 @@ override_dh_auto_build:
mkdir -p $(STAGING)/plugins
cp /plugins/$(APP_NAME)/*.whl $(STAGING)/plugins
# Create the app package.
cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
tar cfz $(APP_TARBALL_ARMADA) -C $(STAGING)/ .
# package fluxcd
rm -f $(STAGING)/auditd_manifest.yaml
cp -R fluxcd-manifests $(STAGING)/
# calculate checksum of all files in app_staging
@ -56,9 +49,8 @@ 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)
install -d -m 755 $(LOGROTATE_FOLDER)
install -m 644 -p -D files/auditd.logrotate $(LOGROTATE_FOLDER)
override_dh_usrlocal:
override_dh_usrlocal:

View File

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