diff --git a/debian_iso_image.inc b/debian_iso_image.inc index ee01c35..86aa93b 100644 --- a/debian_iso_image.inc +++ b/debian_iso_image.inc @@ -1,2 +1 @@ -#stx-sts-silicom-helm -stx-sts-silicom-helm +stx-sts-silicom diff --git a/debian_pkg_dirs b/debian_pkg_dirs index 4a0b8cf..563cd20 100644 --- a/debian_pkg_dirs +++ b/debian_pkg_dirs @@ -1,2 +1,3 @@ +helm-charts/upstream/sts-silicom-helm python3-k8sapp-sts-silicom -stx-sts-silicom-helm +stx-sts-silicom diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/Makefile b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/Makefile similarity index 61% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/files/Makefile rename to helm-charts/upstream/sts-silicom-helm/debian/deb_folder/Makefile index 90fb4fb..aaa2a30 100644 --- a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/Makefile +++ b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/Makefile @@ -1,7 +1,7 @@ # -# Copyright 2017 The Openstack-Helm Authors. +# Copyright 2019 The Openstack-Helm Authors. # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -9,8 +9,8 @@ SHELL := /bin/bash TASK := build -EXCLUDES := helm-toolkit doc tests tools logs tmp -CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) +EXCLUDES := doc tests tools logs tmp +CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) .PHONY: $(EXCLUDES) $(CHARTS) @@ -25,18 +25,16 @@ $(CHARTS): init-%: if [ -f $*/Makefile ]; then make -C $*; fi - if [ -f $*/requirements.yaml ]; then helm dep up $*; fi lint-%: init-% if [ -d $* ]; then helm lint $*; fi build-%: lint-% - if [ -d $* ]; then helm package $*; fi + if [ -d $* ]; then helm package --version $(CHART_VERSION) $*; fi clean: @echo "Clean all build artifacts" rm -f */templates/_partials.tpl */templates/_globals.tpl - rm -f *tgz */charts/*tgz */requirements.lock rm -rf */charts */tmpcharts %: diff --git a/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/changelog b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/changelog new file mode 100644 index 0000000..4156905 --- /dev/null +++ b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/changelog @@ -0,0 +1,5 @@ +sts-silicom-helm (0.0-15) unstable; urgency=medium + + * Initial release. + + -- Rahul Roshan Thu, 09 May 2024 02:13:14 +0000 diff --git a/stx-sts-silicom-helm/debian/deb_folder/control b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/control similarity index 69% rename from stx-sts-silicom-helm/debian/deb_folder/control rename to helm-charts/upstream/sts-silicom-helm/debian/deb_folder/control index de696c3..4074210 100644 --- a/stx-sts-silicom-helm/debian/deb_folder/control +++ b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/control @@ -1,18 +1,13 @@ -Source: stx-sts-silicom-helm +Source: sts-silicom-helm Section: libs Priority: optional Maintainer: StarlingX Developers Build-Depends: debhelper-compat (= 13), - chartmuseum, - helm, - procps, - python3-k8sapp-sts-silicom, - python3-k8sapp-sts-silicom-wheels, - build-info + helm Standards-Version: 4.5.1 Homepage: https://www.starlingx.io -Package: stx-sts-silicom-helm +Package: sts-silicom-helm Section: libs Architecture: any Depends: ${misc:Depends}, diff --git a/stx-sts-silicom-helm/debian/deb_folder/copyright b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/copyright similarity index 93% rename from stx-sts-silicom-helm/debian/deb_folder/copyright rename to helm-charts/upstream/sts-silicom-helm/debian/deb_folder/copyright index 627b7cc..2db0d2a 100644 --- a/stx-sts-silicom-helm/debian/deb_folder/copyright +++ b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/copyright @@ -1,9 +1,9 @@ Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: stx-sts-silicom-helm +Upstream-Name: sts-silicom-helm Source: https://opendev.org/starlingx/app-sts-silicom/ Files: * -Copyright: (c) 2013-2022 Wind River Systems, Inc +Copyright: (c) 2013-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. @@ -23,7 +23,7 @@ License: Apache-2 # 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: 2022 Wind River Systems, Inc +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. diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/0001-Fix-whitespace-chomping-in-services-manifest.patch b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/patches/0001-Fix-whitespace-chomping-in-services-manifest.patch similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/files/0001-Fix-whitespace-chomping-in-services-manifest.patch rename to helm-charts/upstream/sts-silicom-helm/debian/deb_folder/patches/0001-Fix-whitespace-chomping-in-services-manifest.patch diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/0002-Add-imagePullSecrets-to-service-account.patch b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/patches/0002-Add-imagePullSecrets-to-service-account.patch similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/files/0002-Add-imagePullSecrets-to-service-account.patch rename to helm-charts/upstream/sts-silicom-helm/debian/deb_folder/patches/0002-Add-imagePullSecrets-to-service-account.patch diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/0003-Add-imagePullSecrets-to-daemonset.patch b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/patches/0003-Add-imagePullSecrets-to-daemonset.patch similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/files/0003-Add-imagePullSecrets-to-daemonset.patch rename to helm-charts/upstream/sts-silicom-helm/debian/deb_folder/patches/0003-Add-imagePullSecrets-to-daemonset.patch diff --git a/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/patches/series b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/patches/series new file mode 100644 index 0000000..699ae54 --- /dev/null +++ b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/patches/series @@ -0,0 +1,3 @@ +0001-Fix-whitespace-chomping-in-services-manifest.patch +0002-Add-imagePullSecrets-to-service-account.patch +0003-Add-imagePullSecrets-to-daemonset.patch diff --git a/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/rules b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/rules new file mode 100755 index 0000000..ec19c4c --- /dev/null +++ b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/rules @@ -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 = v$(CHART_BASE_VERSION)+STX.$(PATCH_VERSION) + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/lib/helm + +%: + dh $@ + +override_dh_auto_build: + + mkdir -p sts-silicom + + # Copy sts-silicom charts + cp -r charts/* sts-silicom + cp debian/Makefile sts-silicom + + cd sts-silicom && make CHART_VERSION=$(CHART_VERSION) sts-silicom + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 sts-silicom/sts-silicom*.tgz $(APP_FOLDER) + +override_dh_auto_test: diff --git a/stx-sts-silicom-helm/debian/deb_folder/source/format b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/source/format similarity index 100% rename from stx-sts-silicom-helm/debian/deb_folder/source/format rename to helm-charts/upstream/sts-silicom-helm/debian/deb_folder/source/format diff --git a/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/sts-silicom-helm.install b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/sts-silicom-helm.install new file mode 100644 index 0000000..8a0c6de --- /dev/null +++ b/helm-charts/upstream/sts-silicom-helm/debian/deb_folder/sts-silicom-helm.install @@ -0,0 +1 @@ +usr/lib/helm/* diff --git a/helm-charts/upstream/sts-silicom-helm/debian/meta_data.yaml b/helm-charts/upstream/sts-silicom-helm/debian/meta_data.yaml new file mode 100644 index 0000000..ac4a921 --- /dev/null +++ b/helm-charts/upstream/sts-silicom-helm/debian/meta_data.yaml @@ -0,0 +1,14 @@ +--- +debname: sts-silicom-helm +debver: 0.0-15 +src_path: sts-silicom-helm +dl_path: + name: helm-charts-sts-silicom-727b7ca.tar.gz + url: https://github.com/silicom-ltd/STS_HelmCharts/archive/727b7ca0afee06c1b93fec8ad518c6b43095e49d.tar.gz + sha256sum: f9af6997d39c1a9a4d2983a6b8162c1cab8768ca5d0b70c1b796bafd097c6621 +revision: + dist: $STX_DIST + stx_patch: 2 + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/app-sts-silicom/helm-charts/upstream/sts-silicom-helm + BASE_SRCREV: 16db7b80ad66352405ccf053f1363789f8ad7fb3 diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/helm-charts/Makefile b/helm-charts/upstream/sts-silicom-helm/sts-silicom-helm/files/Makefile similarity index 61% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/helm-charts/Makefile rename to helm-charts/upstream/sts-silicom-helm/sts-silicom-helm/files/Makefile index 90fb4fb..aaa2a30 100644 --- a/stx-sts-silicom-helm/stx-sts-silicom-helm/helm-charts/Makefile +++ b/helm-charts/upstream/sts-silicom-helm/sts-silicom-helm/files/Makefile @@ -1,7 +1,7 @@ # -# Copyright 2017 The Openstack-Helm Authors. +# Copyright 2019 The Openstack-Helm Authors. # -# Copyright (c) 2022 Wind River Systems, Inc. +# Copyright (c) 2022-2024 Wind River Systems, Inc. # # SPDX-License-Identifier: Apache-2.0 # @@ -9,8 +9,8 @@ SHELL := /bin/bash TASK := build -EXCLUDES := helm-toolkit doc tests tools logs tmp -CHARTS := helm-toolkit $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) +EXCLUDES := doc tests tools logs tmp +CHARTS := $(filter-out $(EXCLUDES), $(patsubst %/.,%,$(wildcard */.))) .PHONY: $(EXCLUDES) $(CHARTS) @@ -25,18 +25,16 @@ $(CHARTS): init-%: if [ -f $*/Makefile ]; then make -C $*; fi - if [ -f $*/requirements.yaml ]; then helm dep up $*; fi lint-%: init-% if [ -d $* ]; then helm lint $*; fi build-%: lint-% - if [ -d $* ]; then helm package $*; fi + if [ -d $* ]; then helm package --version $(CHART_VERSION) $*; fi clean: @echo "Clean all build artifacts" rm -f */templates/_partials.tpl */templates/_globals.tpl - rm -f *tgz */charts/*tgz */requirements.lock rm -rf */charts */tmpcharts %: diff --git a/stx-sts-silicom-helm/debian/deb_folder/changelog b/stx-sts-silicom-helm/debian/deb_folder/changelog deleted file mode 100644 index 37d7a3f..0000000 --- a/stx-sts-silicom-helm/debian/deb_folder/changelog +++ /dev/null @@ -1,5 +0,0 @@ -stx-sts-silicom-helm (1.0-1) unstable; urgency=medium - - * Initial release. - - -- Steven Webster Thu, 31 Mar 2022 08:40:22 +0000 diff --git a/stx-sts-silicom-helm/debian/deb_folder/rules b/stx-sts-silicom-helm/debian/deb_folder/rules deleted file mode 100755 index c496be1..0000000 --- a/stx-sts-silicom-helm/debian/deb_folder/rules +++ /dev/null @@ -1,76 +0,0 @@ -#!/usr/bin/make -f -# export DH_VERBOSE = 1 - -export ROOT = debian/tmp -export APP_FOLDER = $(ROOT)/usr/local/share/applications/helm - -export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') -export RELEASE = $(shell cat /etc/build.info | grep SW_VERSION | cut -d'"' -f2) -export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') - -export STS_SILICOM_PKG="helm-charts-sts-silicom-727b7ca.tar.gz" -export APP_NAME = sts-silicom -export APP_VERSION = $(RELEASE)-$(REVISION) -export APP_TARBALL_FLUXCD = $(APP_NAME)-$(APP_VERSION).tgz -export HELM_REPO = stx-platform -export STAGING = staging - -%: - dh $@ - -override_dh_auto_build: - # Host a server for the helm charts. - chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." & - sleep 2 - helm repo add local http://localhost:8879/charts - - # Extract the sts-silicom chart - rm -rf fluxcd - mkdir -p fluxcd - tar -C fluxcd -xf $(STS_SILICOM_PKG) - - # Apply patches - cd fluxcd/helm-charts/ && patch --no-backup-if-mismatch --fuzz=0 -p1 < ../../files/0001-Fix-whitespace-chomping-in-services-manifest.patch - cd fluxcd/helm-charts/ && patch --no-backup-if-mismatch --fuzz=0 -p1 < ../../files/0002-Add-imagePullSecrets-to-service-account.patch - cd fluxcd/helm-charts/ && patch --no-backup-if-mismatch --fuzz=0 -p1 < ../../files/0003-Add-imagePullSecrets-to-daemonset.patch - - # Build the charts - cd fluxcd/helm-charts/ && export HELM=helm && $(MAKE) chart - - # Terminate the helm chart server. - pkill chartmuseum - - # Setup the staging directory. - mkdir -p $(STAGING)/charts - - # Copy the fluxcd manifests - cp -R fluxcd-manifests/ $(STAGING)/ - - # Copy the built chart to staging - cp fluxcd/helm-charts/output/sts-silicom-*.tgz $(STAGING)/charts/ - - # Populate metadata. - cp files/metadata.yaml $(STAGING) - 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/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING)/metadata.yaml - - # Copy the plugins: installed in the buildroot - mkdir -p $(STAGING)/plugins - cp /plugins/*.whl $(STAGING)/plugins - - # Generate checksum file and package the tarball - cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 - tar -zcf $(APP_TARBALL_FLUXCD) -C $(STAGING)/ . - - # Cleanup staging - rm -rf $(STAGING) - -override_dh_auto_install: - # Install the app tar file. - install -d -m 755 $(APP_FOLDER) - install -p -D -m 755 $(APP_TARBALL_FLUXCD) $(APP_FOLDER) - -override_dh_auto_test: - -override_dh_usrlocal: diff --git a/stx-sts-silicom-helm/debian/meta_data.yaml b/stx-sts-silicom-helm/debian/meta_data.yaml deleted file mode 100644 index c521b4c..0000000 --- a/stx-sts-silicom-helm/debian/meta_data.yaml +++ /dev/null @@ -1,14 +0,0 @@ ---- -debname: stx-sts-silicom-helm -debver: 1.0-1 -src_path: stx-sts-silicom-helm -dl_files: - helm-charts-sts-silicom-727b7ca.tar.gz: - topdir: helm-charts - url: https://github.com/silicom-ltd/STS_HelmCharts/archive/727b7ca0afee06c1b93fec8ad518c6b43095e49d.tar.gz - md5sum: 8d68d6681428b7a61492ec38f67c52a7 -revision: - dist: $STX_DIST - GITREVCOUNT: - SRC_DIR: ${MY_REPO}/stx/app-sts-silicom - BASE_SRCREV: e63bc5371c914c6e0b7de149f3d6bc24bb3b0dc9 diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/index.yaml b/stx-sts-silicom-helm/stx-sts-silicom-helm/files/index.yaml deleted file mode 100644 index 36db709..0000000 --- a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/index.yaml +++ /dev/null @@ -1,3 +0,0 @@ -apiVersion: v1 -entries: {} -generated: 2019-01-07T12:33:46.098166523-06:00 diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/repositories.yaml b/stx-sts-silicom-helm/stx-sts-silicom-helm/files/repositories.yaml deleted file mode 100644 index e613b63..0000000 --- a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/repositories.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: v1 -generated: 2019-01-02T15:19:36.215111369-06:00 -repositories: -- caFile: "" - cache: /builddir/.helm/repository/cache/local-index.yaml - certFile: "" - keyFile: "" - name: local - password: "" - url: http://127.0.0.1:8879/charts - username: "" - diff --git a/stx-sts-silicom/debian/deb_folder/changelog b/stx-sts-silicom/debian/deb_folder/changelog new file mode 100644 index 0000000..5ec6310 --- /dev/null +++ b/stx-sts-silicom/debian/deb_folder/changelog @@ -0,0 +1,11 @@ +stx-sts-silicom (1.0-2) unstable; urgency=medium + + * Update package to automatically version itself. + + -- Rahul Roshan Thu, 09 May 2024 02:13:14 +0000 + +stx-sts-silicom (1.0-1) unstable; urgency=medium + + * Initial release. + + -- Steven Webster Thu, 31 Mar 2022 08:40:22 +0000 diff --git a/stx-sts-silicom/debian/deb_folder/control b/stx-sts-silicom/debian/deb_folder/control new file mode 100644 index 0000000..ce9ecb0 --- /dev/null +++ b/stx-sts-silicom/debian/deb_folder/control @@ -0,0 +1,18 @@ +Source: stx-sts-silicom +Section: libs +Priority: optional +Maintainer: StarlingX Developers +Build-Depends: debhelper-compat (= 13), + sts-silicom-helm, + python3-k8sapp-sts-silicom-wheels, + build-info +Standards-Version: 4.5.1 +Homepage: https://www.starlingx.io + +Package: stx-sts-silicom +Section: libs +Architecture: any +Depends: ${misc:Depends}, + curl +Description: StarlingX Sts-Silicom Helm Charts + This package contains manifests for the Sts Silicom application. diff --git a/stx-sts-silicom/debian/deb_folder/copyright b/stx-sts-silicom/debian/deb_folder/copyright new file mode 100644 index 0000000..ef2e6e1 --- /dev/null +++ b/stx-sts-silicom/debian/deb_folder/copyright @@ -0,0 +1,41 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: stx-sts-silicom +Source: https://opendev.org/starlingx/app-sts-silicom/ + +Files: * +Copyright: (c) 2013-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'. diff --git a/stx-sts-silicom/debian/deb_folder/rules b/stx-sts-silicom/debian/deb_folder/rules new file mode 100755 index 0000000..6b5815d --- /dev/null +++ b/stx-sts-silicom/debian/deb_folder/rules @@ -0,0 +1,64 @@ +#!/usr/bin/make -f +# export DH_VERBOSE = 1 + +export ROOT = debian/tmp +export APP_FOLDER = $(ROOT)/usr/local/share/applications/helm + +export DEB_VERSION = $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ') +export RELEASE = $(shell cat /etc/build.info | grep SW_VERSION | cut -d'"' -f2) +export REVISION = $(shell echo $(DEB_VERSION) | cut -f 4 -d '.') + +export APP_NAME = sts-silicom +export APP_VERSION = $(RELEASE)-$(REVISION) +export APP_TARBALL = $(APP_NAME)-$(APP_VERSION).tgz +export HELM_FOLDER = /usr/lib/helm +export HELM_REPO = stx-platform +export STAGING = staging + +%: + dh $@ + +override_dh_auto_build: + # Setup the staging directory. + mkdir -p $(STAGING) + cp files/metadata.yaml $(STAGING) + cp -Rv fluxcd-manifests $(STAGING) + mkdir -p $(STAGING)/charts + cp /usr/lib/helm/*.tgz $(STAGING)/charts + + # 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"; \ + sed -i "s/REPLACE_HELM_CHART_VERSION/$$chart_version/g" $$chart_manifest; \ + grep version $$chart_manifest; \ + done + + # Populate metadata. + 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/HELM_REPLACE_REPO/$(HELM_REPO)/g' $(STAGING)/metadata.yaml + + # Copy the plugins: installed in the buildroot + mkdir -p $(STAGING)/plugins + cp /plugins/*.whl $(STAGING)/plugins + + # Create the app package. + cd $(STAGING) && find . -type f ! -name '*.md5' -print0 | xargs -0 md5sum > checksum.md5 + tar cfz $(APP_TARBALL) -C $(STAGING)/ . + + # Cleanup staging + rm -rf $(STAGING) + +override_dh_auto_install: + # Install the app tar file. + install -d -m 755 $(APP_FOLDER) + install -p -D -m 755 $(APP_TARBALL) $(APP_FOLDER) + +override_dh_auto_test: + +override_dh_usrlocal: diff --git a/stx-sts-silicom/debian/deb_folder/source/format b/stx-sts-silicom/debian/deb_folder/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/stx-sts-silicom/debian/deb_folder/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/stx-sts-silicom-helm/debian/deb_folder/stx-sts-silicom-helm.install b/stx-sts-silicom/debian/deb_folder/stx-sts-silicom.install similarity index 100% rename from stx-sts-silicom-helm/debian/deb_folder/stx-sts-silicom-helm.install rename to stx-sts-silicom/debian/deb_folder/stx-sts-silicom.install diff --git a/stx-sts-silicom/debian/meta_data.yaml b/stx-sts-silicom/debian/meta_data.yaml new file mode 100644 index 0000000..568b8cb --- /dev/null +++ b/stx-sts-silicom/debian/meta_data.yaml @@ -0,0 +1,9 @@ +--- +debname: stx-sts-silicom +debver: 1.0-2 +src_path: stx-sts-silicom +revision: + dist: $STX_DIST + GITREVCOUNT: + SRC_DIR: ${MY_REPO}/stx/app-sts-silicom + BASE_SRCREV: e63bc5371c914c6e0b7de149f3d6bc24bb3b0dc9 diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/files/metadata.yaml b/stx-sts-silicom/stx-sts-silicom/files/metadata.yaml similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/files/metadata.yaml rename to stx-sts-silicom/stx-sts-silicom/files/metadata.yaml diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/base/helmrepository.yaml b/stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/base/helmrepository.yaml similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/base/helmrepository.yaml rename to stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/base/helmrepository.yaml diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/base/kustomization.yaml b/stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/base/kustomization.yaml similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/base/kustomization.yaml rename to stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/base/kustomization.yaml diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/base/namespace.yaml b/stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/base/namespace.yaml similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/base/namespace.yaml rename to stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/base/namespace.yaml diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/kustomization.yaml b/stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/kustomization.yaml similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/kustomization.yaml rename to stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/kustomization.yaml diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/sts-silicom/helmrelease.yaml b/stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/sts-silicom/helmrelease.yaml similarity index 88% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/sts-silicom/helmrelease.yaml rename to stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/sts-silicom/helmrelease.yaml index f29fe91..be43b2b 100644 --- a/stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/sts-silicom/helmrelease.yaml +++ b/stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/sts-silicom/helmrelease.yaml @@ -15,7 +15,7 @@ spec: chart: spec: chart: sts-silicom - version: 0.0.12 + version: REPLACE_HELM_CHART_VERSION sourceRef: kind: HelmRepository name: stx-platform @@ -33,4 +33,4 @@ spec: valuesKey: sts-silicom-static-overrides.yaml - kind: Secret name: sts-silicom-system-overrides - valuesKey: sts-silicom-system-overrides.yaml \ No newline at end of file + valuesKey: sts-silicom-system-overrides.yaml diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/sts-silicom/kustomization.yaml b/stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/sts-silicom/kustomization.yaml similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/sts-silicom/kustomization.yaml rename to stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/sts-silicom/kustomization.yaml diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/sts-silicom/sts-silicom-static-overrides.yaml b/stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/sts-silicom/sts-silicom-static-overrides.yaml similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/sts-silicom/sts-silicom-static-overrides.yaml rename to stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/sts-silicom/sts-silicom-static-overrides.yaml diff --git a/stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/sts-silicom/sts-silicom-system-overrides.yaml b/stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/sts-silicom/sts-silicom-system-overrides.yaml similarity index 100% rename from stx-sts-silicom-helm/stx-sts-silicom-helm/fluxcd-manifests/sts-silicom/sts-silicom-system-overrides.yaml rename to stx-sts-silicom/stx-sts-silicom/fluxcd-manifests/sts-silicom/sts-silicom-system-overrides.yaml