Skip to content

Commit

Permalink
Move Helm chart publishing to GA
Browse files Browse the repository at this point in the history
  • Loading branch information
woop committed Aug 3, 2020
1 parent e6d12b2 commit 1f572e8
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 29 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: release

on:
push:
tags:
- 'v*.*.*'

jobs:
get-version:
runs-on: ubuntu-latest
outputs:
release_version: ${{ steps.get_release_version.outputs.release_version }}
steps:
- name: Get release version
id: get_release_version
run: echo ::set-output name=release_version::${GITHUB_REF#refs/*/}
- name: Check output
env:
RELEASE_VERSION: ${{ steps.vars.outputs.release_version }}
run: |
echo $RELEASE_VERSION
echo ${{ steps.vars.outputs.release_version }}
publish-helm-charts:
runs-on: ubuntu-latest
needs: get-version
env:
HELM_VERSION: v2.16.9
steps:
- uses: actions/checkout@v2
- uses: GoogleCloudPlatform/github-actions/setup-gcloud@master
with:
version: '290.0.1'
export_default_credentials: true
project_id: ${{ secrets.GCP_PROJECT_ID }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
- run: gcloud auth configure-docker --quiet
- name: Validate chart versions
run: make lint-versions
- name: Remove previous Helm
run: sudo rm -rf $(which helm)
- name: Install Helm
run: ./infra/scripts/install-helm.sh
- name: Publish Helm charts
run: ./infra/scripts/sync-helm-charts.sh
29 changes: 0 additions & 29 deletions .prow/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -386,32 +386,3 @@ postsubmits:
branches:
# Filter on tags with semantic versioning, prefixed with "v". v0.3 and v0.4 only.
- ^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-]+)*)?$

- name: publish-helm-chart
decorate: true
spec:
containers:
- image: google/cloud-sdk:302.0.0-slim
command:
- bash
- -c
- |
gcloud auth activate-service-account --key-file /etc/gcloud/service-account.json
curl -s https://get.helm.sh/helm-v2.16.1-linux-amd64.tar.gz | tar -C /tmp -xz
mv /tmp/linux-amd64/helm /usr/bin/helm
helm init --client-only
infra/scripts/sync-helm-charts.sh
volumeMounts:
- name: service-account
mountPath: /etc/gcloud/service-account.json
subPath: service-account.json
readOnly: true
volumes:
- name: service-account
secret:
secretName: feast-service-account
branches:
# Filter on tags with semantic versioning, prefixed with "v"
- ^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-]+)*)?$
10 changes: 10 additions & 0 deletions infra/scripts/install-helm.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/usr/bin/env bash
set -e
readonly HELM_URL=https://storage.googleapis.com/kubernetes-helm
readonly HELM_TARBALL="helm-${HELM_VERSION}-linux-amd64.tar.gz"
readonly STABLE_REPO_URL=https://kubernetes-charts.storage.googleapis.com/
readonly INCUBATOR_REPO_URL=https://kubernetes-charts-incubator.storage.googleapis.com/
curl -s "https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz" | tar -C /tmp -xz
sudo mv /tmp/linux-amd64/helm /usr/bin/helm
helm init --client-only
helm repo add incubator "$INCUBATOR_REPO_URL"

0 comments on commit 1f572e8

Please # to comment.