diff --git a/stx-platform-helm/centos/stx-platform-helm.spec b/stx-platform-helm/centos/stx-platform-helm.spec index a335383..dd816ca 100644 --- a/stx-platform-helm/centos/stx-platform-helm.spec +++ b/stx-platform-helm/centos/stx-platform-helm.spec @@ -24,6 +24,7 @@ BuildArch: noarch BuildRequires: helm BuildRequires: openstack-helm-infra +BuildRequires: chartmuseum BuildRequires: python-k8sapp-platform BuildRequires: python-k8sapp-platform-wheels @@ -34,31 +35,12 @@ The StarlingX K8S application for platform integration %setup %build -# initialize helm and build the toolkit -# helm init --client-only does not work if there is no networking -# The following commands do essentially the same as: helm init -%define helm_home %{getenv:HOME}/.helm -mkdir %{helm_home} -mkdir %{helm_home}/repository -mkdir %{helm_home}/repository/cache -mkdir %{helm_home}/repository/local -mkdir %{helm_home}/plugins -mkdir %{helm_home}/starters -mkdir %{helm_home}/cache -mkdir %{helm_home}/cache/archive - -# Stage a repository file that only has a local repo -cp files/repositories.yaml %{helm_home}/repository/repositories.yaml - -# Stage a local repo index that can be updated by the build -cp files/index.yaml %{helm_home}/repository/local/index.yaml - # Stage helm-toolkit in the local repo -cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz helm-charts/ +cp %{helm_folder}/helm-toolkit-%{toolkit_version}.tgz helm-charts/ -# Host a server for the charts -helm serve --repo-path . & -helm repo rm local +# Host a server for the charts. +chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="./helm-charts" & +sleep 2 helm repo add local http://localhost:8879/charts # Make the charts. These produce a tgz file diff --git a/stx-platform-helm/stx-platform-helm/helm-charts/Makefile b/stx-platform-helm/stx-platform-helm/helm-charts/Makefile index eff605d..c97560f 100644 --- a/stx-platform-helm/stx-platform-helm/helm-charts/Makefile +++ b/stx-platform-helm/stx-platform-helm/helm-charts/Makefile @@ -29,6 +29,8 @@ init-%: lint-%: init-% if [ -d $* ]; then helm lint $*; fi + @echo "Clobber dependencies from packaging" + rm -v -f $*/requirements.lock $*/requirements.yaml build-%: lint-% if [ -d $* ]; then helm package $*; fi