Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
[CI] Use repo url in sync (#5981)
Browse files Browse the repository at this point in the history
  • Loading branch information
unguiculus authored and k8s-ci-robot committed Jun 7, 2018
1 parent 20e3f9d commit 21bf1ad
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/repo-sync.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ main() {
setup_helm_client
authenticate

if ! sync_repo stable "$GCS_BUCKET_STABLE"; then
if ! sync_repo stable "$GCS_BUCKET_STABLE" "$STABLE_REPO_URL"; then
log_error "Not all stable charts could be packaged and synced!"
fi
if ! sync_repo incubator "$GCS_BUCKET_INCUBATOR"; then
if ! sync_repo incubator "$GCS_BUCKET_INCUBATOR" "$INCUBATOR_REPO_URL"; then
log_error "Not all incubator charts could be packaged and synced!"
fi
}
Expand All @@ -57,6 +57,7 @@ authenticate() {
sync_repo() {
local repo_dir="${1?Specify repo dir}"
local bucket="${2?Specify repo bucket}"
local repo_url="${3?Specify repo url}"
local sync_dir="${repo_dir}-sync"
local index_dir="${repo_dir}-index"

Expand All @@ -79,7 +80,7 @@ sync_repo() {
fi
done

if helm repo index --url "$bucket" --merge "$index_dir/index.yaml" "$sync_dir"; then
if helm repo index --url "$repo_url" --merge "$index_dir/index.yaml" "$sync_dir"; then
# Move updated index.yaml to sync folder so we don't push the old one again
mv -f "$sync_dir/index.yaml" "$index_dir/index.yaml"

Expand Down

0 comments on commit 21bf1ad

Please sign in to comment.