Last active
January 10, 2025 02:10
GitHub Pages Helm repository
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
helm-extra-args: --timeout 600 | |
check-version-increment: true | |
debug: true |
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
#!/bin/bash | |
set -euo pipefail | |
HELM_DOCS_VERSION="0.11.0" | |
# install helm-docs | |
curl --silent --show-error --fail --location --output /tmp/helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v"${HELM_DOCS_VERSION}"/helm-docs_"${HELM_DOCS_VERSION}"_Linux_x86_64.tar.gz | |
tar -xf /tmp/helm-docs.tar.gz helm-docs | |
# validate docs | |
./helm-docs | |
git diff --exit-code |
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
install-chart: | |
name: install-chart | |
runs-on: ubuntu-latest | |
needs: | |
- lint-chart | |
- lint-docs | |
- kubeval-chart | |
strategy: | |
matrix: | |
k8s: | |
- v1.12.10 | |
- v1.13.12 | |
- v1.14.10 | |
- v1.15.7 | |
- v1.16.4 | |
- v1.17.2 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Create kind ${{ matrix.k8s }} cluster | |
uses: helm/kind-action@master | |
with: | |
node_image: kindest/node:${{ matrix.k8s }} | |
- name: Run chart-testing (install) | |
uses: helm/chart-testing-action@master | |
with: | |
command: install | |
config: .github/ct.yaml |
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
kubeval-chart: | |
runs-on: ubuntu-latest | |
needs: | |
- lint-chart | |
- lint-docs | |
strategy: | |
matrix: | |
k8s: | |
- v1.12.10 | |
- v1.13.12 | |
- v1.14.10 | |
- v1.15.11 | |
- v1.16.8 | |
- v1.17.4 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Run kubeval | |
env: | |
KUBERNETES_VERSION: ${{ matrix.k8s }} | |
run: .github/kubeval.sh |
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
#!/bin/bash | |
set -euo pipefail | |
CHART_DIRS="$(git diff --find-renames --name-only "$(git rev-parse --abbrev-ref HEAD)" remotes/origin/master -- charts | grep '[cC]hart.yaml' | sed -e 's#/[Cc]hart.yaml##g')" | |
KUBEVAL_VERSION="0.14.0" | |
SCHEMA_LOCATION="https://raw.githubusercontent.com/instrumenta/kubernetes-json-schema/master/" | |
# install kubeval | |
curl --silent --show-error --fail --location --output /tmp/kubeval.tar.gz https://github.com/instrumenta/kubeval/releases/download/"${KUBEVAL_VERSION}"/kubeval-linux-amd64.tar.gz | |
tar -xf /tmp/kubeval.tar.gz kubeval | |
# validate charts | |
for CHART_DIR in ${CHART_DIRS}; do | |
helm template "${CHART_DIR}" | ./kubeval --strict --ignore-missing-schemas --kubernetes-version "${KUBERNETES_VERSION#v}" --schema-location "${SCHEMA_LOCATION}" | |
done |
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
lint-chart: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Run chart-testing (lint) | |
uses: helm/chart-testing-action@master | |
with: | |
command: lint | |
config: .github/ct.yaml |
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
lint-docs: | |
runs-on: ubuntu-latest | |
needs: lint-chart | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Run helm-docs | |
run: .github/helm-docs.sh |
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: Release Charts | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'charts/**' | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
- name: Run chart-releaser | |
uses: helm/chart-releaser-action@master | |
env: | |
CR_TOKEN: '${{ secrets.CR_TOKEN }}' |
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: Lint and Test Charts | |
on: | |
pull_request: | |
paths: | |
- 'charts/**' | |
jobs: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment