[k8s] add heap to CSP #29
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish ThirdEye Helm Chart | |
# This releases a new version of the helm chart and cannot be run on pull requests | |
on: | |
push: | |
branches: [ master ] | |
paths: | |
- kubernetes/helm/** | |
# for debugging purpose | |
workflow_dispatch: | |
jobs: | |
publish-thirdeye-helm-chart: | |
runs-on: ubuntu-latest | |
environment: github-production | |
timeout-minutes: 20 | |
steps: | |
- name: Pull repository | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
kubernetes | |
# Note: helm is pre-installed in github image. See https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2204-Readme.md for version numbers | |
- name: Bump version and publish chart | |
run: | | |
cd kubernetes/helm/startree-thirdeye | |
CURRENT_VERSION=$(yq eval ".version" Chart.yaml) | |
NEW_VERSION=$(echo $CURRENT_VERSION | awk -F. '/[0-9]+\.[0-9]+\./{$(NF-1)++;print}' OFS=.) # bump minor version | |
yq eval --inplace ".version = \"${NEW_VERSION}\"" Chart.yaml | |
helm dependency update | |
helm lint --strict . | |
helm package . | |
git config --global user.email "[email protected]" | |
git config --global user.name "ThirdEye CI" | |
git add Chart.yaml | |
git commit -m "[k8s] bump helm chart version from ${CURRENT_VERSION} to ${NEW_VERSION}" | |
git push | |
CHART_PATH=$(ls *.tgz) | |
curl -H "X-JFrog-Art-Api:${HELM_REPOSITORY_TOKEN}" -T ${CHART_PATH} "${HELM_REPOSITORY_URL}/${CHART_PATH}" | |
env: | |
HELM_REPOSITORY_URL: ${{ secrets.HELM_REPOSITORY_URL }} | |
HELM_REPOSITORY_TOKEN: ${{ secrets.MVN_ARTIFACTORY_TOKEN }} | |
- name: Slack - Notify Success | |
uses: rtCamp/action-slack-notify@v2 | |
env: | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: "ThirdEye helm chart release succeeded." | |
SLACK_TITLE: SUCCESS | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
- name: Slack - Notify Failure | |
uses: rtCamp/action-slack-notify@v2 | |
if: failure() | |
env: | |
SLACK_COLOR: ${{ job.status }} | |
SLACK_MESSAGE: "@here - ThirdEye helm chart release failed." | |
SLACK_TITLE: FAILURE | |
SLACK_LINK_NAMES: true | |
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} |