
Fixed versioning and adjusted some build files to bring them as close to a standard as possible. - Removed centos files, however stx_ceph_manager docker image tag is still master-centos-stable-latest - Added debian_pkg_dirs and debian_iso_image.inc (stx-rook-ceph-helm not added into the debian iso) - Added version tracking via GITREVCOUNT - Fixed mismatch in plugin name, set to python3-k8sapp-<app> - Standardized plugin debian files (rules, *.install) - Plugin wheels saved to /plugin instead of /plugin/<app> - Removed some Armada hooks and files which were preventing the app from uploading on the debian system Note: app name is not in line with the stx-APP-helm template Test Plan: PASS - Build-pkgs PASS - app tarball contains wheel file PASS - wheel versioning updated properly PASS - app upload Story: 2010542 Task: 47250 Depends-On: https://review.opendev.org/c/starlingx/rook-ceph/+/842363 Signed-off-by: Leonardo Fagundes Luz Serrano <Leonardo.FagundesLuzSerrano@windriver.com> Change-Id: I5aedaa509914dad45cab667d33253cb3926c8053
83 lines
2.3 KiB
Makefile
83 lines
2.3 KiB
Makefile
#!/usr/bin/make -f
|
|
export DH_VERBOSE = 1
|
|
|
|
export ROOT = debian/tmp
|
|
export APP_FOLDER = $(ROOT)/usr/local/share/applications/helm
|
|
export INITRD_DIR = $(ROOT)/etc/rc.d/init.d
|
|
|
|
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
|
export MAJOR = $(shell echo $(DEB_VERSION) | cut -f 1 -d '.')
|
|
export MINOR_PATCH = $(shell echo $(DEB_VERSION) | cut -f 2 -d '.')
|
|
|
|
export APP_NAME = rook-ceph-apps
|
|
export APP_VERSION = $(MAJOR).$(MINOR_PATCH)
|
|
export APP_TARBALL_FLUXCD = $(APP_NAME)-fluxcd-$(APP_VERSION).tgz
|
|
|
|
export HELM_REPO = stx-platform
|
|
export STAGING_FLUXCD = staging-fluxcd
|
|
|
|
%:
|
|
dh $@
|
|
|
|
override_dh_auto_build:
|
|
|
|
############
|
|
# COMMON #
|
|
############
|
|
# Host a server for the helm 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
|
|
|
|
# Make the charts. These produce a tgz file
|
|
cd helm-charts && \
|
|
make rook-operator && \
|
|
make rook-ceph && \
|
|
make rook-ceph-provisioner
|
|
|
|
# Terminate the helm chart server.
|
|
pkill chartmuseum
|
|
|
|
|
|
############
|
|
# FLUXCD #
|
|
############
|
|
# Setup staging
|
|
mkdir -p $(STAGING_FLUXCD)
|
|
cp files/metadata.yaml $(STAGING_FLUXCD)
|
|
cp -Rv fluxcd-manifests $(STAGING_FLUXCD)
|
|
mkdir -p $(STAGING_FLUXCD)/charts
|
|
cp helm-charts/*.tgz $(STAGING_FLUXCD)/charts
|
|
|
|
# Populate metadata
|
|
sed -i 's/@APP_NAME@/$(APP_NAME)/g' $(STAGING_FLUXCD)/metadata.yaml
|
|
sed -i 's/@APP_VERSION@/$(APP_VERSION)/g' $(STAGING_FLUXCD)/metadata.yaml
|
|
sed -i 's/@HELM_REPO@/$(HELM_REPO)/g' $(STAGING_FLUXCD)/metadata.yaml
|
|
|
|
# Copy the plugins: installed in the buildroot
|
|
mkdir -p $(STAGING_FLUXCD)/plugins
|
|
cp /plugins/*.whl $(STAGING_FLUXCD)/plugins
|
|
|
|
# Package it up
|
|
cd $(STAGING_FLUXCD)
|
|
find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
|
|
tar -zcf $(APP_TARBALL_FLUXCD) -C $(STAGING_FLUXCD)/ .
|
|
|
|
# Cleanup staging
|
|
rm -fr $(STAGING_FLUXCD)
|
|
|
|
override_dh_auto_install:
|
|
# Install the app tar file
|
|
install -d -m 755 $(APP_FOLDER)
|
|
install -d -m 755 $(INITRD_DIR)
|
|
install -p -D -m 755 $(APP_TARBALL_FLUXCD) $(APP_FOLDER)
|
|
install -m 750 files/rook-mon-exit.sh $(INITRD_DIR)/rook-mon-exit
|
|
|
|
# Prevents dh_fixperms from changing the permissions defined in this file
|
|
override_dh_fixperms:
|
|
dh_fixperms --exclude etc/rc.d/init.d/rook-mon-exit
|
|
|
|
override_dh_usrlocal:
|
|
echo "do nothing"
|
|
|