Skip to content

Commit

Permalink
kanister release copy profile (#4678)
Browse files Browse the repository at this point in the history
* kanister release cp profile

profile is a dependency for all our charts
we are releasing it and all charts at the same time
CF is slow, so adding new profiles chart into app charts
also updating kasniter repo local cache

* create charts folder if not there
  • Loading branch information
Ilya Kislenko committed Feb 23, 2019
1 parent a26ab82 commit 6395c2a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build/release_helm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ release_helm_charts() {
fi

mkdir ${package_folder}
helm dep update ${chart_path}
local out=$(helm package ${chart_path} --version ${version} -d ${package_folder})
[[ ${out} =~ ^.*/(.*\.tgz)$ ]]
local chart_tar=${BASH_REMATCH[1]}
Expand All @@ -36,6 +35,8 @@ release_helm_charts() {
echo "Uploading chart and index file"
aws s3 cp ${package_folder}/${chart_tar} ${HELM_RELEASE_BUCKET}
aws s3 cp ${package_folder}/index.yaml ${HELM_RELEASE_BUCKET}
cp -f ${package_folder}/index.yaml ${HELM_HOME:-${HOME}/.helm}/repository/cache/kanister-index.yaml
cp -f ${package_folder}/${chart_tar} ${HELM_HOME:-${HOME}/.helm}/cache/archive/
}

main() {
Expand All @@ -49,6 +50,9 @@ main() {
local -a example_charts=( "kanister-mongodb-replicaset" "kanister-mysql" "kanister-postgresql" "kanister-elasticsearch")
for chart_name in "${example_charts[@]}"
do
#profile chart is a dependency which will not be avalible due slow cloud caching
[ -d examples/helm/kanister/${chart_name}/charts/ ] || mkdir -p examples/helm/kanister/${chart_name}/charts/
cp ${HELM_HOME:-${HOME}/.helm}/cache/archive/profile-${version}.tgz examples/helm/kanister/${chart_name}/charts/
release_helm_charts "examples/helm/kanister/${chart_name}" "${version}"
done

Expand Down

0 comments on commit 6395c2a

Please sign in to comment.