From 50091acd0ca49dcba4b4d2f03237f3174944a695 Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Thu, 21 Feb 2019 10:00:57 +0530 Subject: [PATCH] update deploy.sh to push cephfs chat Signed-off-by: Madhu Rajanna --- deploy.sh | 47 ++++++++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/deploy.sh b/deploy.sh index 9ce90e442..dff25413b 100755 --- a/deploy.sh +++ b/deploy.sh @@ -1,5 +1,29 @@ #!/bin/bash +push_helm_chats() { + PACKAGE=$1 + CHANGED=0 + VERSION=$(grep 'version:' deploy/"$PACKAGE"/helm/Chart.yaml | awk '{print $2}') + + if [ ! -f "tmp/csi-charts/docs/$PACKAGE/ceph-csi-$PACKAGE-$VERSION.tgz" ]; then + CHANGED=1 + ln -s helm deploy/"$PACKAGE"/ceph-csi-"$PACKAGE" + mkdir -p tmp/csi-charts/docs/"$PACKAGE" + pushd tmp/csi-charts/docs/"$PACKAGE" >/dev/null + helm init --client-only + helm package ../../../../deploy/"$PACKAGE"/ceph-csi-"$PACKAGE" + popd >/dev/null + fi + + if [ $CHANGED -eq 1 ]; then + pushd tmp/csi-charts/docs >/dev/null + helm repo index . + git add --all :/ && git commit -m "Update repo" + git push https://"$GITHUB_TOKEN"@github.com/ceph/csi-charts + popd >/dev/null + fi +} + if [ "${TRAVIS_BRANCH}" == 'master' ]; then export RBD_IMAGE_VERSION='v0.3.0' export CEPHFS_IMAGE_VERSION='v0.3.0' @@ -29,25 +53,6 @@ if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then mkdir -p csi-charts/docs popd >/dev/null - CHANGED=0 - VERSION=$(grep 'version:' deploy/rbd/helm/Chart.yaml | awk '{print $2}') - - if [ ! -f "tmp/csi-charts/docs/rbd/ceph-csi-rbd-$VERSION.tgz" ]; then - CHANGED=1 - ln -s helm deploy/rbd/ceph-csi-rbd - mkdir -p tmp/csi-charts/docs/rbd - pushd tmp/csi-charts/docs/rbd >/dev/null - helm init --client-only - helm package ../../../../deploy/rbd/ceph-csi-rbd - popd >/dev/null - fi - - if [ $CHANGED -eq 1 ]; then - pushd tmp/csi-charts/docs >/dev/null - helm repo index . - git add --all :/ && git commit -m "Update repo" - git push https://"$GITHUB_TOKEN"@github.com/ceph/csi-charts - popd >/dev/null - fi - + push_helm_chats rbd + push_helm_chats cephfs fi