Tracey Bogue 903861605a Add Debian packaging for portieris app
Create Debian packages for portieris-helm, python-k8sapp-portieris
and stx-portieris-helm packages.

Story: 2009101
Task: 43845

Signed-off-by: Tracey Bogue <tracey.bogue@windriver.com>
Change-Id: I7631737c9b8e5074db5b29c7b3e7f7b7d34e926e
2021-12-03 09:26:54 -06:00

33 lines
1.2 KiB
Makefile
Executable File

#!/usr/bin/make -f
# export DH_VERBOSE = 1
export ROOT = debian/tmp
export CHART_FOLDER = $(ROOT)/usr/lib/helm
export PORTIERIS_VERSION = 0.7.0
export PORTIERIS_TARBALL = portieris-$(PORTIERIS_VERSION).tgz
%:
dh $@
override_dh_auto_build:
# Apply patches.
patch -d portieris --no-backup-if-mismatch --fuzz=0 -p1 < 0001-Squash-required-portieris-fixes.patch
patch -d portieris --no-backup-if-mismatch --fuzz=0 -p1 < 0002-add-image-pull-secrets-to-images.patch
patch -d portieris --no-backup-if-mismatch --fuzz=0 -p1 < 0003-add-toggle-to-reinstall-the-admission-webhook.patch
patch -d portieris --no-backup-if-mismatch --fuzz=0 -p1 < 0004-run-admission-webhooks-as-non-root.patch
patch -d portieris --no-backup-if-mismatch --fuzz=0 -p1 < 0005-add-toleration.patch
# Host a server for the helm charts.
chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" \
--storage-local-rootdir="." &
sleep 2
helm repo add local http://localhost:8879/charts
# Create the TGZ file.
cd portieris && make helm.package
# Terminate the helm chart server.
pkill chartmuseum
override_dh_auto_install:
# Install the app tar file.
install -d -m 755 $(CHART_FOLDER)
install -p -D -m 755 portieris/$(PORTIERIS_TARBALL) $(CHART_FOLDER)