Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feast Helm charts and build script #289

Merged
merged 12 commits into from
Nov 9, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .prow/scripts/sync-helm-charts.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#!/usr/bin/env bash

# Script to sync local charts to remote helm repository in Google Cloud Storage
# Copied from: https://github.com/helm/charts/blob/master/test/repo-sync.sh

set -o errexit
set -o nounset
set -o pipefail

log_error() {
printf '\e[31mERROR: %s\n\e[39m' "$1" >&2
}

# Assume working directory is Feast repository root folder
repo_dir=infra/charts
bucket=gs://feast-charts
repo_url=https://feast-charts.storage.googleapis.com/
sync_dir=/tmp/syncdir
index_dir=/tmp/indexdir

rm -rf $sync_dir $index_dir

echo "Syncing repo '$repo_dir'..."

mkdir -p "$sync_dir"
if ! gsutil cp "$bucket/index.yaml" "$index_dir/index.yaml"; then
log_error "Exiting because unable to copy index locally. Not safe to proceed."
exit 1
fi

exit_code=0

for dir in "$repo_dir"/*; do
if helm dependency build "$dir"; then
helm package --destination "$sync_dir" "$dir"
else
log_error "Problem building dependencies. Skipping packaging of '$dir'."
exit_code=1
fi
done

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"

gsutil -m rsync "$sync_dir" "$bucket"

# Make sure index.yaml is synced last
gsutil cp "$index_dir/index.yaml" "$bucket"
else
log_error "Exiting because unable to update index. Not safe to push update."
exit 1
fi

ls -l "$sync_dir"

exit "$exit_code"
9 changes: 0 additions & 9 deletions Dockerfile

This file was deleted.

119 changes: 0 additions & 119 deletions infra/charts/README.md

This file was deleted.

5 changes: 0 additions & 5 deletions infra/charts/feast-core/Chart.yaml

This file was deleted.

Binary file removed infra/charts/feast-core/charts/postgresql-3.17.0.tgz
Binary file not shown.
6 changes: 0 additions & 6 deletions infra/charts/feast-core/requirements.lock

This file was deleted.

5 changes: 0 additions & 5 deletions infra/charts/feast-core/requirements.yaml

This file was deleted.

48 changes: 0 additions & 48 deletions infra/charts/feast-core/templates/core-configmap.yaml

This file was deleted.

110 changes: 0 additions & 110 deletions infra/charts/feast-core/templates/core-deploy.yaml

This file was deleted.

Loading