Update for 2.21.1 (#148) #286
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: | |
push: | |
paths: | |
- 'charts/**' | |
- '.github/**' | |
pull_request: | |
branches: | |
- master | |
workflow_dispatch: | |
env: | |
KUBE_SCORE_VERSION: 1.10.0 | |
HELM_VERSION: v3.4.1 | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Set up Helm | |
uses: azure/setup-helm@v1 | |
with: | |
version: ${{ env.HELM_VERSION }} | |
- name: Set up kube-score | |
run: | | |
wget https://github.com/zegl/kube-score/releases/download/v${{ env.KUBE_SCORE_VERSION }}/kube-score_${{ env.KUBE_SCORE_VERSION }}_linux_amd64 -O kube-score | |
chmod 755 kube-score | |
- name: Kube-score generated manifests | |
run: helm template charts/* | ./kube-score score - | |
--ignore-test pod-networkpolicy | |
--ignore-test deployment-has-poddisruptionbudget | |
--ignore-test deployment-has-host-podantiaffinity | |
--ignore-test container-security-context | |
--ignore-test container-resources | |
--ignore-test pod-probes | |
--ignore-test container-image-tag | |
--enable-optional-test container-security-context-privileged | |
# python is a requirement for the chart-testing action below (supports yamllint among other tests) | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.7 | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config .ci/ct-config.yaml) | |
if [[ -n "$changed" ]]; then | |
echo "::set-output name=changed::true" | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint --config .ci/ct-config.yaml | |
# Refer to https://github.com/kubernetes-sigs/kind/releases when updating the node_images | |
- name: Create 1.23 kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:v1.23.13@sha256:ef453bb7c79f0e3caba88d2067d4196f427794086a7d0df8df4f019d5e336b61 | |
cluster_name: kubernetes-1.23 | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) against 1.23 | |
run: ct install --config .ci/ct-config.yaml | |
- name: Create 1.24 kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:v1.24.12@sha256:1e12918b8bc3d4253bc08f640a231bb0d3b2c5a9b28aa3f2ca1aee93e1e8db16 | |
cluster_name: kubernetes-1.24 | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) against 1.24 | |
run: ct install --config .ci/ct-config.yaml | |
- name: Create 1.25 kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:v1.25.8@sha256:00d3f5314cc35327706776e95b2f8e504198ce59ac545d0200a89e69fce10b7f | |
cluster_name: kubernetes-1.25 | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) against 1.25 | |
run: ct install --config .ci/ct-config.yaml | |
- name: Create 1.26 kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:v1.26.3@sha256:61b92f38dff6ccc29969e7aa154d34e38b89443af1a2c14e6cfbd2df6419c66f | |
cluster_name: kubernetes-1.26 | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) against 1.26 | |
run: ct install --config .ci/ct-config.yaml |