-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
georgedriver
authored and
georgedriver
committed
Jun 14, 2020
1 parent
7056862
commit 9aa17b1
Showing
18 changed files
with
1,823 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
helm-extra-args: --timeout 600s | ||
# 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/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 --values "${CHART_DIR}"/ci/ci-values.yaml "${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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Lint and Test Charts | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- 'charts/**' | ||
|
||
jobs: | ||
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 | ||
|
||
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 | ||
|
||
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 | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
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 "[email protected]" | ||
- name: Run chart-releaser | ||
uses: helm/chart-releaser-action@master | ||
env: | ||
CR_TOKEN: '${{ secrets.CR_TOKEN }}' |
Oops, something went wrong.