Skip to content

Commit 1f572e8

Browse files
committed
Move Helm chart publishing to GA
1 parent e6d12b2 commit 1f572e8

File tree

3 files changed

+55
-29
lines changed

3 files changed

+55
-29
lines changed

.github/workflows/release.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
jobs:
9+
get-version:
10+
runs-on: ubuntu-latest
11+
outputs:
12+
release_version: ${{ steps.get_release_version.outputs.release_version }}
13+
steps:
14+
- name: Get release version
15+
id: get_release_version
16+
run: echo ::set-output name=release_version::${GITHUB_REF#refs/*/}
17+
- name: Check output
18+
env:
19+
RELEASE_VERSION: ${{ steps.vars.outputs.release_version }}
20+
run: |
21+
echo $RELEASE_VERSION
22+
echo ${{ steps.vars.outputs.release_version }}
23+
24+
publish-helm-charts:
25+
runs-on: ubuntu-latest
26+
needs: get-version
27+
env:
28+
HELM_VERSION: v2.16.9
29+
steps:
30+
- uses: actions/checkout@v2
31+
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
32+
with:
33+
version: '290.0.1'
34+
export_default_credentials: true
35+
project_id: ${{ secrets.GCP_PROJECT_ID }}
36+
service_account_key: ${{ secrets.GCP_SA_KEY }}
37+
- run: gcloud auth configure-docker --quiet
38+
- name: Validate chart versions
39+
run: make lint-versions
40+
- name: Remove previous Helm
41+
run: sudo rm -rf $(which helm)
42+
- name: Install Helm
43+
run: ./infra/scripts/install-helm.sh
44+
- name: Publish Helm charts
45+
run: ./infra/scripts/sync-helm-charts.sh

.prow/config.yaml

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -386,32 +386,3 @@ postsubmits:
386386
branches:
387387
# Filter on tags with semantic versioning, prefixed with "v". v0.3 and v0.4 only.
388388
- ^v0\.(3|4)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$
389-
390-
- name: publish-helm-chart
391-
decorate: true
392-
spec:
393-
containers:
394-
- image: google/cloud-sdk:302.0.0-slim
395-
command:
396-
- bash
397-
- -c
398-
- |
399-
gcloud auth activate-service-account --key-file /etc/gcloud/service-account.json
400-
401-
curl -s https://get.helm.sh/helm-v2.16.1-linux-amd64.tar.gz | tar -C /tmp -xz
402-
mv /tmp/linux-amd64/helm /usr/bin/helm
403-
helm init --client-only
404-
405-
infra/scripts/sync-helm-charts.sh
406-
volumeMounts:
407-
- name: service-account
408-
mountPath: /etc/gcloud/service-account.json
409-
subPath: service-account.json
410-
readOnly: true
411-
volumes:
412-
- name: service-account
413-
secret:
414-
secretName: feast-service-account
415-
branches:
416-
# Filter on tags with semantic versioning, prefixed with "v"
417-
- ^v(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(-(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(\+[0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*)?$

infra/scripts/install-helm.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
readonly HELM_URL=https://storage.googleapis.com/kubernetes-helm
4+
readonly HELM_TARBALL="helm-${HELM_VERSION}-linux-amd64.tar.gz"
5+
readonly STABLE_REPO_URL=https://kubernetes-charts.storage.googleapis.com/
6+
readonly INCUBATOR_REPO_URL=https://kubernetes-charts-incubator.storage.googleapis.com/
7+
curl -s "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" | tar -C /tmp -xz
8+
sudo mv /tmp/linux-amd64/helm /usr/bin/helm
9+
helm init --client-only
10+
helm repo add incubator "$INCUBATOR_REPO_URL"

0 commit comments

Comments
 (0)