Skip to content

Commit

Permalink
Fixing git clone chart repo 3 (#16)
Browse files Browse the repository at this point in the history
* Fixing git clone chart repo
hatemosphere authored Aug 20, 2019
1 parent b814185 commit 6271719
Showing 2 changed files with 6 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ deploy:
skip_cleanup: true
github_token: $GITHUB_TOKEN
keep_history: true
local_dir: dist-repo/out
local_dir: dist-repo
committer_from_gh: true
on:
branch: master
14 changes: 5 additions & 9 deletions package/package.sh
Original file line number Diff line number Diff line change
@@ -16,20 +16,18 @@ helm init --client-only
# add helm repos for charts in requirements
helm repo add jetstack https://charts.jetstack.io/

mkdir -p "${BUILD_DIR}"
git clone "https://${GITHUB_USER:-$DEFAULT_GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GIT_REPO}" "${BUILD_DIR}"
pushd "${BUILD_DIR}"
git checkout "${TARGET_BRANCH}" || git checkout --orphan "${TARGET_BRANCH}"
popd

for chart in ./stable/*; do
echo "--- Packaging ${chart} into ${BUILD_DIR}"
helm dep update "${chart}" || true
helm package --destination "${BUILD_DIR}" "${chart}"
done
ls "${BUILD_DIR}"

git clone "https://${GITHUB_USER:-$DEFAULT_GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GIT_REPO}" out
cd out
git checkout "${TARGET_BRANCH}" || git checkout --orphan "${TARGET_BRANCH}"
cd ..

cp out/index.yaml "${BUILD_DIR}" || true
pushd "${BUILD_DIR}"
echo "--- Reindexing ${BUILD_DIR}"
if [ -f index.yaml ]; then
@@ -38,5 +36,3 @@ else
helm repo index --url "${HELM_REPO_URL}" .
fi
popd

cp "${BUILD_DIR}"/* out/

0 comments on commit 6271719

Please sign in to comment.