
Enable auto-versioning of helm charts to ensure the FluxCD helm controller recognizes chart changes. To guarantee the helm chart version is incremented when a helm chart change is submitted, the following is implemented: - Provide a top level hierarchy for helm charts to differentiate between upstream and custom charts: helm-charts/{custom,upstream} - Arrange exiting helm chart in appropriate helm-charts location. Custom for helm charts built and maintained in this repository. Upstream for directly used and/or directly used plus patched. - stx-APP-helm now contains only manifests and final application packaging rules. No custom helm charts should be delivered here. - Establish a new package(s) for the custom or upstream helm chart(s). - Enforce a baseline version for all helm charts; eg 'APP-helm'. Maintain current rev counts for all new packages, where applicable. - Update 'stx-APP-helm' to: - Update the build dependencies to include the new helm chart package and remove dependency on helm - Update the rules to remove building the dependency APP helm chart(s) and automatically update the chart versions in the FluxCD helmrelease.yaml files. 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. PASS - Validate basic application lifecycle operations: upload/apply/remove/delete. Story: 2010929 Task: 49614 Change-Id: Ied7ff31b03b0b22d099649c91f712e6f9aafcd63 Signed-off-by: Joshua Reed <joshua.reed@windriver.com>
28 lines
728 B
Makefile
Executable File
28 lines
728 B
Makefile
Executable File
#!/usr/bin/make -f
|
|
# export DH_VERBOSE = 1
|
|
|
|
export ROOT = debian/tmp
|
|
export APP_FOLDER = $(ROOT)/usr/lib/helm
|
|
|
|
export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
|
|
export RELEASE = $(shell echo $(DEB_VERSION) | cut -f 1 -d '-')
|
|
export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.')
|
|
export CHART_VERSION = $(RELEASE).$(REVISION)
|
|
|
|
%:
|
|
dh $@
|
|
|
|
override_dh_auto_build:
|
|
# Stage the chart for building
|
|
mkdir -p build
|
|
mv Makefile ptp-notification build
|
|
|
|
# Build the chart
|
|
cd build && make CHART_VERSION=$(CHART_VERSION) ptp-notification
|
|
|
|
override_dh_auto_install:
|
|
install -d -m 755 $(APP_FOLDER)
|
|
install -p -D -m 755 build/ptp-notification*.tgz $(APP_FOLDER)
|
|
|
|
override_dh_auto_test:
|