Skip to content

Commit e0c7812

Browse files
authored
Add Helm Chart Publishing (#24)
Signed-off-by: Willem Pienaar <git@willem.co>
1 parent 8867f2a commit e0c7812

File tree

5 files changed

+71
-97
lines changed

5 files changed

+71
-97
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,4 +121,28 @@ jobs:
121121
VERSION=${RELEASE_VERSION:1}
122122
make build-ingestion-jar-no-tests REVISION=${VERSION}
123123
gsutil cp ./spark/ingestion/target/feast-ingestion-spark-${VERSION}.jar gs://${PUBLISH_BUCKET}/feast-spark/artifacts/
124-
fi
124+
fi
125+
126+
publish-helm-charts:
127+
runs-on: ubuntu-latest
128+
needs: get-version
129+
env:
130+
HELM_VERSION: v2.17.0
131+
VERSION_WITHOUT_PREFIX: ${{ needs.get-version.outputs.version_without_prefix }}
132+
steps:
133+
- uses: actions/checkout@v2
134+
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
135+
with:
136+
version: '290.0.1'
137+
export_default_credentials: true
138+
project_id: ${{ secrets.GCP_PROJECT_ID }}
139+
service_account_key: ${{ secrets.GCP_SA_KEY }}
140+
- run: gcloud auth configure-docker --quiet
141+
- name: Remove previous Helm
142+
run: sudo rm -rf $(which helm)
143+
- name: Install Helm
144+
run: ./infra/scripts/install-helm.sh
145+
- name: Validate all version consistency
146+
run: ./infra/scripts/validate-helm-chart-versions.sh $VERSION_WITHOUT_PREFIX
147+
- name: Publish Helm charts
148+
run: ./infra/scripts/push-helm-charts.sh $VERSION_WITHOUT_PREFIX

infra/scripts/push-helm-charts.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
if [ $# -ne 1 ]; then
6+
echo "Please provide a single semver version (without a \"v\" prefix) to test the repository against, e.g 0.99.0"
7+
exit 1
8+
fi
9+
10+
bucket=gs://feast-helm-charts
11+
repo_url=https://feast-helm-charts.storage.googleapis.com/
12+
13+
helm plugin install https://github.com/hayorov/helm-gcs.git || true
14+
15+
helm repo add feast-helm-chart-repo $bucket
16+
17+
helm package infra/charts/feast-spark
18+
19+
helm gcs push feast-spark-${1}.tgz feast-helm-chart-repo

infra/scripts/sync-helm-charts.sh

Lines changed: 0 additions & 59 deletions
This file was deleted.

infra/scripts/validate-helm-chart-docker-image.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
function finish {
4+
echo "Please ensure the Chart.yaml have the version ${1}"
5+
exit
6+
}
7+
8+
trap "finish $1" ERR
9+
10+
set -e
11+
12+
if [ $# -ne 1 ]; then
13+
echo "Please provide a single semver version (without a \"v\" prefix) to test the repository against, e.g 0.99.0"
14+
exit 1
15+
fi
16+
17+
# Get project root
18+
PROJECT_ROOT_DIR=$(git rev-parse --show-toplevel)
19+
20+
echo "Trying to find version ${1} in the feast-spark Chart.yaml. Exiting if not found."
21+
grep "version: ${1}" "${PROJECT_ROOT_DIR}/infra/charts/feast-spark/Chart.yaml"
22+
23+
24+
echo "Trying to find version ${1} in the feast-jobservice Chart.yaml. Exiting if not found."
25+
grep "version: ${1}" "${PROJECT_ROOT_DIR}/infra/charts/feast-spark/charts/feast-jobservice/Chart.yaml"
26+
27+
echo "Success! All versions found!"

0 commit comments

Comments
 (0)