Skip to content

chore(deps): bump helm/kind-action from 1.7.0 to 1.8.0 #1663

chore(deps): bump helm/kind-action from 1.7.0 to 1.8.0

chore(deps): bump helm/kind-action from 1.7.0 to 1.8.0 #1663

Workflow file for this run

name: Lint and test charts - current
on: pull_request
jobs:
yamllint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Helm
run: |
cd /tmp
curl -fsSLo get_helm.sh https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3
chmod 700 get_helm.sh
./get_helm.sh
- name: Add dependency chart repos
run: |
helm repo add banzaicloud-stable https://kubernetes-charts.banzaicloud.com
helm repo add lagoon https://uselagoon.github.io/lagoon-charts/
helm repo add amazeeio https://amazeeio.github.io/charts/
helm repo add nats https://nats-io.github.io/k8s/helm/charts/
helm repo add kube-logging https://kube-logging.github.io/helm-charts
- name: Generate helm templates
run: |
cd charts
# hacky workaround for lagoon-test templated values
tests=[foo,bar] envsubst '$tests' < lagoon-test/ci/linter-values.yaml.tpl > lagoon-test/ci/linter-values.yaml
for chart in *; do
helm dependency build $chart
mkdir -p /tmp/charts/$chart
helm template $chart $chart \
--values $chart/ci/linter-values.yaml \
--output-dir /tmp/charts/$chart
done
# workaround until logging-operator templates are fixed:
# https://github.com/banzaicloud/logging-operator/pull/792
rm -rf /tmp/charts/lagoon-logging/lagoon-logging/charts/logging-operator
# workaround until nats templates are fixed
rm -rf /tmp/charts/lagoon-remote/lagoon-remote/charts/nats
rm -rf /tmp/charts/lagoon-core/lagoon-core/charts/nats
- name: Install YAMLlint
run: sudo apt-get -y install yamllint
- name: Lint the templates
run: |
set -euo pipefail
cat > .yamllint <<EOF
extends: default
rules:
indentation:
indent-sequences: consistent
line-length: disable
EOF
yamllint -f parsable /tmp/charts | awk -F: '{print; system("sed \"" $2 "q;d\" " $1)}'
# runs for all charts other than lagoon-test, which is excluded in
# default.ct.yaml
lint-test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: "0"
- name: Set up chart-testing dependencies
run: sudo apt-get -y install python3-wheel
- name: Set up chart-testing
uses: helm/[email protected]
- name: Run chart-testing (list-changed)
id: list-changed
run: |
changed=$(ct list-changed --config ./default.ct.yaml)
if [[ "$changed" ]]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "$changed"
fi
- name: Run chart-testing (lint)
run: ct lint --config ./default.ct.yaml
- name: Create kind cluster
uses: helm/[email protected]
with:
version: v0.20.0
node_image: kindest/node:v1.26.6@sha256:6e2d8b28a5b601defe327b98bd1c2d1930b49e5d8c512e1895099e4504007adb
kubectl_version: v1.26.6
if: |
(steps.list-changed.outputs.changed == 'true') ||
(contains(github.event.pull_request.labels.*.name, 'needs-testing'))
- name: Run chart-testing (install)
run: ct install --config ./default.ct.yaml
artifacthub-changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: "0"
- name: Install gojq
run: |
cd /tmp
curl -sSLO https://github.com/itchyny/gojq/releases/download/v0.12.10/gojq_v0.12.10_linux_amd64.tar.gz
tar -xf ./gojq_v0.12.10_linux_amd64.tar.gz
sudo cp /tmp/gojq_v0.12.10_linux_amd64/gojq /usr/local/bin/gojq
- name: Run artifacthub.io changelog check
run: |
for chartyaml in $(git diff --name-only origin/main | awk -F/ '/^charts\// { printf "%s/%s/%s\n",$1,$2,"Chart.yaml" }' | sort -u); do
if diff <(gojq -r --yaml-input '.annotations."artifacthub.io/changes"' <(git show HEAD:$chartyaml)) <(gojq -r --yaml-input '.annotations."artifacthub.io/changes"' <(git show origin/main:$chartyaml)); then
echo "$chartyaml artifacthub.io changelog needs an update!"
exit 1
fi
done