mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-09 16:00:22 +00:00
create temp directory to push helm charts
Instead of creating the tmp directory in ceph-csi create temp directory outside and use it to push helm charts Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
parent
d1e7d1eab3
commit
c8df7aa475
21
deploy.sh
21
deploy.sh
@ -5,6 +5,7 @@ source "$(dirname "${0}")/scripts/build_step.inc.sh"
|
||||
|
||||
push_helm_charts() {
|
||||
PACKAGE=$1
|
||||
CHARTDIR=$2
|
||||
VERSION=${ENV_CSI_IMAGE_VERSION//v/} # Set version (without v prefix)
|
||||
|
||||
# update information in Chart.yaml if the branch is not master
|
||||
@ -23,13 +24,14 @@ push_helm_charts() {
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p tmp/csi-charts/docs/"$PACKAGE"
|
||||
pushd tmp/csi-charts/docs/"$PACKAGE" >/dev/null
|
||||
mkdir -p "$CHARTDIR/csi-charts/docs/$PACKAGE"
|
||||
cp -R "./charts/ceph-csi-$PACKAGE" "$CHARTDIR/csi-charts/docs/$PACKAGE"
|
||||
pushd "$CHARTDIR/csi-charts/docs/$PACKAGE" >/dev/null
|
||||
helm init --client-only
|
||||
helm package ../../../../charts/ceph-csi-"$PACKAGE"
|
||||
helm package "ceph-csi-$PACKAGE"
|
||||
popd >/dev/null
|
||||
|
||||
pushd tmp/csi-charts/docs >/dev/null
|
||||
pushd "$CHARTDIR/csi-charts/docs" >/dev/null
|
||||
helm repo index .
|
||||
git add --all :/ && git commit -m "Update for helm charts $PACKAGE-$VERSION"
|
||||
git push https://"$GITHUB_TOKEN"@github.com/ceph/csi-charts
|
||||
@ -93,8 +95,9 @@ if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
||||
|
||||
build_push_images
|
||||
|
||||
mkdir -p tmp
|
||||
pushd tmp >/dev/null
|
||||
CSI_CHARTS_DIR=$(mktemp -d)
|
||||
|
||||
pushd "$CSI_CHARTS_DIR" >/dev/null
|
||||
|
||||
curl -L https://git.io/get_helm.sh | bash
|
||||
|
||||
@ -105,8 +108,10 @@ if [ "${TRAVIS_PULL_REQUEST}" == "false" ]; then
|
||||
popd >/dev/null
|
||||
|
||||
build_step "pushing RBD helm charts"
|
||||
push_helm_charts rbd
|
||||
push_helm_charts rbd "$CSI_CHARTS_DIR"
|
||||
build_step "pushing CephFS helm charts"
|
||||
push_helm_charts cephfs
|
||||
push_helm_charts cephfs "$CSI_CHARTS_DIR"
|
||||
build_step_log "finished deployment!"
|
||||
|
||||
[ -n "${CSI_CHARTS_DIR}" ] && rm -rf "${CSI_CHARTS_DIR}"
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user