Ramon Gazoni Lacerda ad23e138db Add debian package stx-sdo-helm
Add debian packaging infrastructure for sdx-sdo-helm to build
a debian package.

Test Plan:
PASS: Built package
PASS: Built iso
PASS: Installed controller

Story: 2009101
Task: 44045

Signed-off-by: Ramon Gazoni Lacerda <Ramon.GazoniLacerda@windriver.com>
Change-Id: I0592b9619b5367a937e4d4c92874dcf220d1c8d7
2022-02-25 12:23:06 -05:00

41 lines
1.0 KiB
Makefile
Executable File

#!/usr/bin/make -f
#export DH_VERBOSE = 1
export ROOT = debian/tmp
export APP_FOLDER = $(ROOT)/usr/lib/application
export ARMADA_FOLDER = $(ROOT)/usr/lib/armada
export HELM_FOLDER = $(ROOT)/usr/lib/helm
export TOOLKIT_VERSION = 0.2.19
%:
dh $@
override_dh_auto_build:
# Stage helm-toolkit in the local repo
cp /usr/lib/helm/helm-toolkit-$(TOOLKIT_VERSION).tgz helm-charts/
# Host a server for the charts
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="./helm-charts" &
sleep 2
helm repo add local http://localhost:8879/charts
# Create the TGZ file.
cd helm-charts && make
# Terminate the helm chart server.
pkill chartmuseum
override_dh_auto_install:
# helm_folder is created by openstack-helm-infra
install -d -m 755 $(APP_FOLDER)
install -p -D -m 755 files/metadata.yaml $(APP_FOLDER)
install -d -m 755 $(HELM_FOLDER)
install -p -D -m 755 helm-charts/*.tgz $(HELM_FOLDER)
install -d -m 755 $(ARMADA_FOLDER)
install -p -D -m 755 manifests/*.yaml $(ARMADA_FOLDER)