diff --git a/portieris-helm/centos/portieris-helm.spec b/portieris-helm/centos/portieris-helm.spec index 78a5c86..55000ca 100644 --- a/portieris-helm/centos/portieris-helm.spec +++ b/portieris-helm/centos/portieris-helm.spec @@ -31,6 +31,7 @@ Source6: serverKey.pem BuildArch: noarch BuildRequires: helm +BuildRequires: chartmuseum %description StarlingX portieris charts @@ -39,30 +40,12 @@ StarlingX portieris charts %setup -n portieris %build -# initialize helm -# 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 %{SOURCE1} %{helm_home}/repository/repositories.yaml - -# Stage a local repo index that can be updated by the build -cp %{SOURCE2} %{helm_home}/repository/local/index.yaml - # Host a server for the charts -helm serve --repo-path . & -helm repo rm local +chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." & +sleep 2 helm repo add local http://localhost:8879/charts + # Create a chart tarball compliant with sysinv kube-app.py %define app_staging %{_builddir}/staging %define app_tarball portieris-%{version}.tgz diff --git a/stx-portieris-helm/centos/stx-portieris-helm.spec b/stx-portieris-helm/centos/stx-portieris-helm.spec index 3a89dce..af1078f 100644 --- a/stx-portieris-helm/centos/stx-portieris-helm.spec +++ b/stx-portieris-helm/centos/stx-portieris-helm.spec @@ -22,6 +22,7 @@ Source0: %{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: helm +BuildRequires: chartmuseum BuildRequires: portieris-helm Requires: portieris-helm @@ -32,28 +33,9 @@ StarlingX Portieris Armada Helm Charts %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 - # Host a server for the charts -helm serve --repo-path . & -helm repo rm local +chartmuseum --debug --port=8879 --context-path='/charts' --storage="local" --storage-local-rootdir="." & +sleep 2 helm repo add local http://localhost:8879/charts # terminate helm server (the last backgrounded task)