Michel Thebeau d921df347e chart version auto-increment scheme
Refer to the example for auto-increment presented by Bob Church:
https://review.opendev.org/c/starlingx/platform-armada-app/+/904464

Implement these specifics for vault-helm:

 - Use StarlingX debian git revcount packaging mechanisms to derive the
   semver BUILD version for upstream helm charts which maintains the
   upstream chart version and adds a versioned BUILD extension.

     <valid semver> ::= <version core> "+" <build>

   Chart version (MAJOR.MINOR.PATCH+STX.REV) is passed to 'helm package'
   command to force the version, where REV == 'git revcount'

 - Update the rules to automatically update the chart versions in the
   fluxCD helmrelease.yaml files.

Test Plan:
PASS  file byte level comparison of package before/after
PASS  AIO-SX vault sanity
PASS  application-update

Story: 2010929
Task: 49399

Change-Id: Id40547c1001ab8fa2d7c83abbcc5c9d44185ee2f
Signed-off-by: Michel Thebeau <Michel.Thebeau@windriver.com>
2024-02-20 21:37:09 +00:00

31 lines
839 B
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 = "0.25.0"
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:
# Set up chart build files.
mkdir vault
cp Chart.yaml values.yaml vault
cp vault-init.yaml vault-certificates.yaml templates
cat _helpers-CA.tpl >> templates/_helpers.tpl
mv templates vault/templates
# Create the TGZ file.
make CHART_VERSION=$(CHART_VERSION) vault
override_dh_auto_install:
# Install the app tar file.
install -d -m 755 $(APP_FOLDER)
install -p -D -m 755 vault*.tgz $(APP_FOLDER)
override_dh_auto_test: