Auto-increment chart versions

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.
 - Use StarlingX debian git revcount packaging mechanisms to derive the
   semver PATCH version for custom helm charts. Chart
   version (MAJOR.MINOR.PATCH) is passed to 'helm package' command to
   force the version, where PATCH == 'git revcount'
 - 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.

     <version core> ::= <major> "." <minor> "." <patch>
     <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'
 - 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: 49608

Change-Id: Iaa91d6977a687f1d6ee2909fe8ed9269cd9c3574
Signed-off-by: Joshua Reed <joshua.reed@windriver.com>
This commit is contained in:
Joshua Reed 2024-02-22 10:12:34 -07:00
parent 2a5db63dc2
commit 5eb05a3c0b
43 changed files with 453 additions and 47 deletions

View File

@ -1,3 +1,6 @@
helm-charts/custom/oidc-client-helm
helm-charts/custom/secret-observer-helm
helm-charts/upstream/dexidp-helm
oidc-auth-tools oidc-auth-tools
python3-k8sapp-oidc python3-k8sapp-oidc
stx-oidc-auth-helm stx-oidc-auth-helm

View File

@ -0,0 +1,5 @@
oidc-client-helm (0.1-1) unstable; urgency=medium
* Initial release.
-- Joshua Reed <joshua.reed@windriver.com> Tue, 21 Dec 2024 20:07:42 +0000

View File

@ -0,0 +1,15 @@
Source: oidc-client-helm
Section: libs
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13),
helm,
Standards-Version: 4.5.1
Homepage: https://www.starlingx.io
Package: oidc-client-helm
Section: libs
Architecture: any
Depends: ${misc:Depends}
Description: StarlingX Platform Oidc Client helm chart
This package contains a Oidc Client helm chart.

View File

@ -0,0 +1,41 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: oidc-client-helm
Source: https://opendev.org/starlingx/oidc-auth-armada-app/
Files: *
Copyright: (c) 2019-2024 Wind River Systems, Inc
License: Apache-2
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
https://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian-based systems the full text of the Apache version 2.0 license
can be found in `/usr/share/common-licenses/Apache-2.0'.
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2024 Wind River Systems, Inc
License: Apache-2
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
https://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian-based systems the full text of the Apache version 2.0 license
can be found in `/usr/share/common-licenses/Apache-2.0'.

View File

@ -0,0 +1 @@
usr/lib/helm/*

View File

@ -0,0 +1,29 @@
#!/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:
mkdir -p build
# Copy oidc-client items.
mv Makefile oidc-client build
# Build the chart
cd build && make CHART_VERSION=$(CHART_VERSION) oidc-client
override_dh_auto_install:
install -d -m 755 $(APP_FOLDER)
install -p -D -m 755 build/oidc-client*.tgz $(APP_FOLDER)
override_dh_auto_test:

View File

@ -0,0 +1 @@
3.0 (quilt)

View File

@ -0,0 +1,10 @@
---
debname: oidc-client-helm
debver: 0.1-0
src_path: oidc-client-helm
revision:
dist: $STX_DIST
stx_patch: 19
GITREVCOUNT:
SRC_DIR: ${MY_REPO}/stx/oidc-auth-armada-app/helm-charts/custom/oidc-client-helm/oidc-client-helm/oidc-client
BASE_SRCREV: 2a5db63dc246d1e2cdbc964b40e7530c035b2b1e

View File

@ -1,7 +1,7 @@
# #
# Copyright 2017 The Openstack-Helm Authors. # Copyright 2017 The Openstack-Helm Authors.
# #
# Copyright (c) 2019 Wind River Systems, Inc. # Copyright (c) 2019,2024 Wind River Systems, Inc.
# #
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
# #
@ -9,8 +9,8 @@
SHELL := /bin/bash SHELL := /bin/bash
TASK := build TASK := build
EXCLUDES := helm-toolkit doc tests tools logs tmp EXCLUDES := doc tests tools logs tmp
CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
.PHONY: $(EXCLUDES) $(CHARTS) .PHONY: $(EXCLUDES) $(CHARTS)
@ -25,18 +25,16 @@ $(CHARTS):
init-%: init-%:
if [ -f $*/Makefile ]; then make -C $*; fi if [ -f $*/Makefile ]; then make -C $*; fi
if [ -f $*/requirements.yaml ]; then helm dep up $*; fi
lint-%: init-% lint-%: init-%
if [ -d $* ]; then helm lint $*; fi if [ -d $* ]; then helm lint $*; fi
build-%: lint-% build-%: lint-%
if [ -d $* ]; then helm package $*; fi if [ -d $* ]; then helm package --version $(CHART_VERSION) $*; fi
clean: clean:
@echo "Clean all build artifacts" @echo "Clean all build artifacts"
rm -f */templates/_partials.tpl */templates/_globals.tpl rm -f */templates/_partials.tpl */templates/_globals.tpl
rm -f *tgz */charts/*tgz */requirements.lock
rm -rf */charts */tmpcharts rm -rf */charts */tmpcharts
%: %:

View File

@ -0,0 +1,5 @@
secret-observer-helm (0.1-1) unstable; urgency=medium
* Initial release.
-- Joshua Reed <joshua.reed@windriver.com> Tue, 21 Dec 2024 20:07:42 +0000

View File

@ -0,0 +1,15 @@
Source: secret-observer-helm
Section: libs
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13),
helm,
Standards-Version: 4.5.1
Homepage: https://www.starlingx.io
Package: secret-observer-helm
Section: libs
Architecture: any
Depends: ${misc:Depends}
Description: StarlingX Platform secret observer helm chart
This package contains a helm chart for the secret observer

View File

@ -0,0 +1,41 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: secret-observer-helm
Source: https://opendev.org/starlingx/helm-charts/
Files: *
Copyright: (c) 2019-2024 Wind River Systems, Inc
License: Apache-2
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
https://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian-based systems the full text of the Apache version 2.0 license
can be found in `/usr/share/common-licenses/Apache-2.0'.
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2024 Wind River Systems, Inc
License: Apache-2
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
https://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian-based systems the full text of the Apache version 2.0 license
can be found in `/usr/share/common-licenses/Apache-2.0'.

View File

@ -28,6 +28,6 @@ index 322bd73..5cf33d5 100644
imagePullSecrets: imagePullSecrets:
- name: default-registry-key - name: default-registry-key
{{- end -}} {{- end -}}
-- --
2.29.2 2.29.2

View File

@ -0,0 +1 @@
0001-move-metadata-release-for-helmv3.patch

View File

@ -0,0 +1,30 @@
#!/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:
mkdir -p build
mv helm-charts build
mv Makefile build/helm-charts
# Patch & Build the chart
cd build/helm-charts && make CHART_VERSION=$(CHART_VERSION) secret-observer
override_dh_auto_install:
install -d -m 755 $(APP_FOLDER)
install -p -D -m 755 build/helm-charts/secret-observer*.tgz $(APP_FOLDER)
override_dh_auto_test:

View File

@ -0,0 +1 @@
3.0 (quilt)

View File

@ -0,0 +1,12 @@
---
debname: secret-observer-helm
debver: 0.1-1
src_path: secret-observer-helm
src_files:
- ${MY_REPO}/stx/helm-charts/secret-observer/secret-observer/helm-charts
revision:
dist: $STX_DIST
GITREVCOUNT:
stx_patch: 1
SRC_DIR: ${MY_REPO}/stx/oidc-auth-armada-app/helm-charts/custom/secret-observer-helm/secret-observer-helm
BASE_SRCREV: 2a5db63dc246d1e2cdbc964b40e7530c035b2b1e

View File

@ -0,0 +1,41 @@
#
# Copyright 2017 The Openstack-Helm Authors.
#
# Copyright (c) 2019,2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# It's necessary to set this because some environments don't link sh -> bash.
SHELL := /bin/bash
TASK := build
EXCLUDES := doc tests tools logs tmp
CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
.PHONY: $(EXCLUDES) $(CHARTS)
all: $(CHARTS)
$(CHARTS):
@if [ -d $@ ]; then \
echo; \
echo "===== Processing [$@] chart ====="; \
make $(TASK)-$@; \
fi
init-%:
if [ -f $*/Makefile ]; then make -C $*; fi
lint-%: init-%
if [ -d $* ]; then helm lint $*; fi
build-%: lint-%
if [ -d $* ]; then helm package --version $(CHART_VERSION) $*; fi
clean:
@echo "Clean all build artifacts"
rm -f */templates/_partials.tpl */templates/_globals.tpl
rm -rf */charts */tmpcharts
%:
@:

View File

@ -0,0 +1,5 @@
dexidp-helm (0.15-3) unstable; urgency=medium
* Initial release of wrapped dexidp v0.15.3
-- Joshua Reed <joshua.reed@windriver.com> Tue, 21 Dec 2024 20:07:42 +0000

View File

@ -0,0 +1,15 @@
Source: dexidp-helm
Section: libs
Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13),
helm
Standards-Version: 4.5.1
Homepage: https://www.starlingx.io
Package: dexidp-helm
Section: libs
Architecture: any
Depends: ${misc:Depends}
Description: StarlingX DEX Helm Charts
This package contains helm charts for the upstream DEX application.

View File

@ -0,0 +1,41 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: dexidp-helm
Source: https://github.com/dexidp
Files: *
Copyright: (c) 2024 Wind River Systems, Inc
License: Apache-2
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
https://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian-based systems the full text of the Apache version 2.0 license
can be found in `/usr/share/common-licenses/Apache-2.0'.
# If you want to use GPL v2 or later for the /debian/* files use
# the following clauses, or change it to suit. Delete these two lines
Files: debian/*
Copyright: 2024 Wind River Systems, Inc
License: Apache-2
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
.
https://www.apache.org/licenses/LICENSE-2.0
.
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
.
On Debian-based systems the full text of the Apache version 2.0 license
can be found in `/usr/share/common-licenses/Apache-2.0'.

View File

@ -0,0 +1 @@
usr/lib/helm/*

View File

@ -19,14 +19,14 @@ values.yaml.
Signed-off-by: Michel Thebeau <Michel.Thebeau@windriver.com> Signed-off-by: Michel Thebeau <Michel.Thebeau@windriver.com>
Signed-off-by: Joao Victor Portal <Joao.VictorPortal@windriver.com> Signed-off-by: Joao Victor Portal <Joao.VictorPortal@windriver.com>
--- ---
dex/templates/secret.yaml | 67 +++++++++++++++++++++++++++++++++++++-- templates/secret.yaml | 67 +++++++++++++++++++++++++++++++++++++--
dex/values.yaml | 13 ++++++++ values.yaml | 13 ++++++++
2 files changed, 78 insertions(+), 2 deletions(-) 2 files changed, 78 insertions(+), 2 deletions(-)
diff --git a/dex/templates/secret.yaml b/dex/templates/secret.yaml diff --git a/templates/secret.yaml b/templates/secret.yaml
index 27d3954..24f694a 100644 index 27d3954..24f694a 100644
--- a/dex/templates/secret.yaml --- a/templates/secret.yaml
+++ b/dex/templates/secret.yaml +++ b/templates/secret.yaml
@@ -6,6 +6,69 @@ metadata: @@ -6,6 +6,69 @@ metadata:
labels: labels:
{{- include "dex.labels" . | nindent 4 }} {{- include "dex.labels" . | nindent 4 }}
@ -99,14 +99,14 @@ index 27d3954..24f694a 100644
+ {{- end }} + {{- end }}
+ {{- end }} + {{- end }}
{{- end }} {{- end }}
diff --git a/dex/values.yaml b/dex/values.yaml diff --git a/values.yaml b/values.yaml
index 756d49e..34ebf1b 100644 index 756d49e..34ebf1b 100644
--- a/dex/values.yaml --- a/values.yaml
+++ b/dex/values.yaml +++ b/values.yaml
@@ -55,6 +55,19 @@ configSecret: @@ -55,6 +55,19 @@ configSecret:
# See the [official documentation](https://dexidp.io/docs/). # See the [official documentation](https://dexidp.io/docs/).
config: {} config: {}
+# Addendum for config: +# Addendum for config:
+# -- extraStaticClients +# -- extraStaticClients
+# if config.extraStaticClients is present it will be added to +# if config.extraStaticClients is present it will be added to
@ -123,6 +123,6 @@ index 756d49e..34ebf1b 100644
# -- Additional storage [volumes](https://kubernetes.io/docs/concepts/storage/volumes/). # -- Additional storage [volumes](https://kubernetes.io/docs/concepts/storage/volumes/).
# See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1) for details. # See the [API reference](https://kubernetes.io/docs/reference/kubernetes-api/workload-resources/pod-v1/#volumes-1) for details.
volumes: [] volumes: []
-- --
2.17.1 2.17.1

View File

@ -0,0 +1 @@
0001-Create-new-config-value-extraStaticClients.patch

View File

@ -0,0 +1,30 @@
#!/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:
mkdir -p build/dex
mv *.yaml build/dex
mv Makefile build
mv templates ci README.md LICENSE build/dex
cd build && make CHART_VERSION=$(CHART_VERSION) dex
override_dh_auto_install:
# Install the app tar file.
install -d -m 755 $(APP_FOLDER)
install -p -D -m 755 build/dex*.tgz $(APP_FOLDER)
override_dh_auto_test:

View File

@ -0,0 +1 @@
3.0 (quilt)

View File

@ -0,0 +1,15 @@
---
debname: dexidp-helm
debver: 0.15-3
dl_path:
name: dex-0.15.3.tgz
url: https://github.com/dexidp/helm-charts/releases/download/dex-0.15.3/dex-0.15.3.tgz
sha256sum: 8100ba92ee85ee1b25298bcf9ea72f09a004ef502e43f38e45bf793cae5b88f3
src_files:
- dexidp-helm/files/Makefile
revision:
dist: $STX_DIST
stx_patch: 1
GITREVCOUNT:
BASE_SRCREV: 2a5db63dc246d1e2cdbc964b40e7530c035b2b1e
SRC_DIR: ${MY_REPO}/stx/oidc-auth-armada-app/helm-charts/upstream/dexidp-helm

View File

@ -0,0 +1,41 @@
#
# Copyright 2017 The Openstack-Helm Authors.
#
# Copyright (c) 2019,2024 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
# It's necessary to set this because some environments don't link sh -> bash.
SHELL := /bin/bash
TASK := build
EXCLUDES := doc tests tools logs tmp
CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.)))
.PHONY: $(EXCLUDES) $(CHARTS)
all: $(CHARTS)
$(CHARTS):
@if [ -d $@ ]; then \
echo; \
echo "===== Processing [$@] chart ====="; \
make $(TASK)-$@; \
fi
init-%:
if [ -f $*/Makefile ]; then make -C $*; fi
lint-%: init-%
if [ -d $* ]; then helm lint $*; fi
build-%: lint-%
if [ -d $* ]; then helm package --version $(CHART_VERSION) $*; fi
clean:
@echo "Clean all build artifacts"
rm -f */templates/_partials.tpl */templates/_globals.tpl
rm -rf */charts */tmpcharts
%:
@:

View File

@ -1,3 +1,9 @@
stx-oidc-auth-helm (1.0-2) unstable; urgency=medium
* Update package to split helm charts into individual packages.
-- Joshua Reed <joshua.reed@windriver.com> Thu, 22 Feb 2024 10:50:42 +0000
stx-oidc-auth-helm (1.0-1) unstable; urgency=medium stx-oidc-auth-helm (1.0-1) unstable; urgency=medium
* Initial release. * Initial release.

View File

@ -4,7 +4,9 @@ Priority: optional
Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io> Maintainer: StarlingX Developers <starlingx-discuss@lists.starlingx.io>
Build-Depends: debhelper-compat (= 13), Build-Depends: debhelper-compat (= 13),
helm, helm,
python3-k8sapp-oidc, oidc-client-helm,
secret-observer-helm,
dexidp-helm,
python3-k8sapp-oidc-wheels, python3-k8sapp-oidc-wheels,
build-info build-info
Standards-Version: 4.5.1 Standards-Version: 4.5.1

View File

@ -15,40 +15,44 @@ export APP_TARBALL = $(APP_NAME)-$(APP_VERSION).tgz
export HELM_FOLDER = /usr/lib/helm export HELM_FOLDER = /usr/lib/helm
export HELM_REPO = stx-platform export HELM_REPO = stx-platform
export STAGING = staging export STAGING = staging
export DEX_TAR_NAME = dex-0.15.3.tgz
%: %:
dh $@ dh $@
override_dh_auto_build: override_dh_auto_build:
# patch secret-observer
patch -p1 < files/0001-move-metadata-release-for-helmv3.patch
# Create the TGZ file.
cd helm-charts && make oidc-client
cd helm-charts && make secret-observer
# patch the dex chart
tar xf ${DEX_TAR_NAME}
rm ${DEX_TAR_NAME}
patch -p1 < files/0001-Create-new-config-value-extraStaticClients.patch
find dex -type f -print0 | xargs -0 tar zcf ${DEX_TAR_NAME}
rm -r dex
# Setup the staging directory. # Setup the staging directory.
mkdir -p $(STAGING) mkdir -p $(STAGING)
cp files/metadata.yaml $(STAGING) cp files/metadata.yaml $(STAGING)
cp -Rv fluxcd-manifests $(STAGING)
mkdir -p $(STAGING)/charts mkdir -p $(STAGING)/charts
cp helm-charts/*.tgz $(STAGING)/charts cp /usr/lib/helm/*.tgz $(STAGING)/charts
cp dex*.tgz $(STAGING)/charts
cp -R fluxcd-manifests $(STAGING) # Adjust the helmrelease yamls based on the chart versions
for c in $(STAGING)/charts/*; do \
chart=$$(basename $$c .tgz); \
chart_name=$${chart%-*}; \
chart_version=$${chart##*-}; \
echo "Found $$chart; name: $$chart_name, version: $$chart_version"; \
chart_manifest=$$(find $(STAGING)/fluxcd-manifests -name helmrelease.yaml -exec grep -q "chart:.*$$chart_name" {} \; -print); \
echo "Updating manifest: $$chart_manifest with chart version: $$chart_version"; \
sed -i "s/REPLACE_HELM_CHART_VERSION/$$chart_version/g" $$chart_manifest; \
grep version $$chart_manifest; \
done
# Populate metadata. # Populate metadata.
sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING)/metadata.yaml sed -i 's/APP_REPLACE_NAME/$(APP_NAME)/g' $(STAGING)/metadata.yaml
sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING)/metadata.yaml sed -i 's/APP_REPLACE_VERSION/$(APP_VERSION)/g' $(STAGING)/metadata.yaml
sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING)/metadata.yaml sed -i 's/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING)/metadata.yaml
# Copy the plugins: installed in the buildroot # Copy the plugins: installed in the buildroot
mkdir -p $(STAGING)/plugins mkdir -p $(STAGING)/plugins
cp /plugins/*.whl $(STAGING)/plugins cp /plugins/*.whl $(STAGING)/plugins
# Create the app package. # Create the app package.
cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5
tar cfz $(APP_TARBALL) -C $(STAGING)/ . tar cfz $(APP_TARBALL) -C $(STAGING)/ .
# Cleanup staging # Cleanup staging
rm -rf $(STAGING) rm -rf $(STAGING)
@ -58,4 +62,6 @@ override_dh_auto_install:
install -p -D -m 755 $(APP_TARBALL) $(APP_FOLDER) install -p -D -m 755 $(APP_TARBALL) $(APP_FOLDER)
install -d -m 750 $(BACKUP_FOLDER) install -d -m 750 $(BACKUP_FOLDER)
override_dh_usrlocal: override_dh_auto_test:
override_dh_usrlocal:

View File

@ -1,18 +1,10 @@
--- ---
debname: stx-oidc-auth-helm debname: stx-oidc-auth-helm
debver: 1.0-1 debver: 1.0-2
src_path: stx-oidc-auth-helm src_path: stx-oidc-auth-helm
src_files:
- ${MY_REPO}/stx/helm-charts/secret-observer/secret-observer/helm-charts
dl_files:
dex-0.15.3.tgz:
topdir: null
url: https://github.com/dexidp/helm-charts/releases/download/dex-0.15.3/dex-0.15.3.tgz
sha256sum: 8100ba92ee85ee1b25298bcf9ea72f09a004ef502e43f38e45bf793cae5b88f3
revision: revision:
dist: $STX_DIST dist: $STX_DIST
FILES_GITREVCOUNT: stx_patch: 6
- 638dc8f9242b0b65afed7c54c6ddc5f60744ab97
GITREVCOUNT: GITREVCOUNT:
SRC_DIR: ${MY_REPO}/stx/oidc-auth-armada-app SRC_DIR: ${MY_REPO}/stx/oidc-auth-armada-app
BASE_SRCREV: f045d574f30a3fa5cb555fe805a7a16244091c79 BASE_SRCREV: f045d574f30a3fa5cb555fe805a7a16244091c79

View File

@ -15,7 +15,7 @@ spec:
chart: chart:
spec: spec:
chart: dex chart: dex
version: 0.15.3 version: REPLACE_HELM_CHART_VERSION
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
name: stx-platform name: stx-platform

View File

@ -15,7 +15,7 @@ spec:
chart: chart:
spec: spec:
chart: oidc-client chart: oidc-client
version: 0.1.1 version: REPLACE_HELM_CHART_VERSION
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
name: stx-platform name: stx-platform

View File

@ -15,7 +15,7 @@ spec:
chart: chart:
spec: spec:
chart: secret-observer chart: secret-observer
version: 0.1.1 version: REPLACE_HELM_CHART_VERSION
sourceRef: sourceRef:
kind: HelmRepository kind: HelmRepository
name: stx-platform name: stx-platform