Files
rook-ceph/helm-charts/upstream/migration-rook-ceph-helm/debian/deb_folder/rules
Luiz Felipe Kina 5a72dd467c Auto-increment chart versions
Enable auto-versioning of helm charts to ensure the FluxCD
helm controller recognizes chart changes for rook-ceph.

The structure of custom and upstream is following the template created
on the oid-auth-armada-app
(https://review.opendev.org/c/starlingx/oidc-auth-armada-app/+/909914).

Test Plan:
PASS: Build all packages generating an application tarball verifying
      all versions on the charts and application make sense.
PASS: Introduce temporary chart changes and ensure that the versions
      increment as expected (rook-ceph-1.7.11+STX.4.tgz and
      rook-ceph-cluster-1.7.11+STX.4.tgz charts inside
      rook-ceph-migration package).
PASS: Validate basic application lifecycle operations:
      upload/apply/remove/delete
PASS: Create a volume using PVC through cephfs and test read/write
      on the corresponding pools at SX plaforms.

Story: 2010929
Task: 50063

Change-Id: I8cae4c09da7686fbdc3279c3478f5ce30a47b76a
Signed-off-by: Luiz Felipe Kina <LuizFelipe.EiskeKina@windriver.com>
2024-05-17 20:48:53 +00:00

33 lines
1.1 KiB
Makefile
Executable File

#!/usr/bin/make -f
export DH_VERBOSE = 1
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
export PATCH_VERSION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.')
export CHART_BASE_VERSION = $(shell echo $(DEB_VERSION) | sed 's/-/./' | cut -d '.' -f 1-3)
export CHART_VERSION = $(CHART_BASE_VERSION)+STX.$(PATCH_VERSION)
export ROOT = debian/tmp
export APP_FOLDER = $(ROOT)/usr/lib/helm
%:
dh $@
override_dh_auto_build:
# Copy migration-rook-ceph-helm charts
mkdir -p migration-rook-ceph-helm
cp -r cluster/charts/* migration-rook-ceph-helm
cp Makefile migration-rook-ceph-helm
# Create the tgz file
cd migration-rook-ceph-helm && make CHART_VERSION=$(CHART_VERSION) rook-ceph
cd migration-rook-ceph-helm && make CHART_VERSION=$(CHART_VERSION) rook-ceph-cluster
override_dh_auto_install:
# Install the app tar file.
install -d -m 755 $(APP_FOLDER)
install -p -D -m 755 migration-rook-ceph-helm/rook-ceph-cluster*.tgz $(APP_FOLDER)
install -p -D -m 755 migration-rook-ceph-helm/rook-ceph-[!c]*.tgz $(APP_FOLDER)
override_dh_auto_test: