bump chart to 0.6.2 #243
Workflow file for this run
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
# Copyright 2024 StreamNative | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# | |
# Unless required by applicable law or agreed to in writing, software | |
# distributed under the License is distributed on an "AS IS" BASIS, | |
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
# See the License for the specific language governing permissions and | |
# limitations under the License. | |
# | |
name: Chart Test | |
on: | |
pull_request: | |
branches: | |
- '*' | |
paths: | |
- 'charts/**' | |
- '.github/workflows/chart-test.yml' | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
outputs: | |
changed: ${{ steps.list-changed.outputs.changed }} | |
chart_name: ${{ steps.list-changed.outputs.chart_name }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Check if the CRDs are update to date | |
run: | | |
diff config/crd/bases/resource.streamnative.io_pulsarconnections.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarconnections.yaml && \ | |
diff config/crd/bases/resource.streamnative.io_pulsargeoreplications.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsargeoreplications.yaml && \ | |
diff config/crd/bases/resource.streamnative.io_pulsarnamespaces.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarnamespaces.yaml && \ | |
diff config/crd/bases/resource.streamnative.io_pulsarpermissions.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarpermissions.yaml && \ | |
diff config/crd/bases/resource.streamnative.io_pulsartenants.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsartenants.yaml && \ | |
diff config/crd/bases/resource.streamnative.io_pulsarfunctions.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarfunctions.yaml && \ | |
diff config/crd/bases/resource.streamnative.io_pulsarsinks.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarsinks.yaml && \ | |
diff config/crd/bases/resource.streamnative.io_pulsarsources.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarsources.yaml && \ | |
diff config/crd/bases/resource.streamnative.io_pulsarpackages.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsarpackages.yaml && \ | |
diff config/crd/bases/resource.streamnative.io_pulsartopics.yaml charts/pulsar-resources-operator/crds/resource.streamnative.io_pulsartopics.yaml | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.12.3 | |
- name: Install plugin unittest | |
run: | | |
helm plugin install https://github.com/quintush/helm-unittest | |
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and | |
# yamllint (https://github.com/adrienverge/yamllint) which require Python | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
chart_name=$(ct list-changed --config ct.yaml | grep -v '>>>' || echo '') | |
if [[ -n "$chart_name" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
echo "chart_name=$chart_name" >> $GITHUB_OUTPUT | |
else | |
echo "changed=false" >> $GITHUB_OUTPUT | |
echo "chart_name=$chart_name" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint --config ct.yaml | |
- name: Run template test | |
if: steps.list-changed.outputs.changed == 'true' | |
run: | | |
for i in v1.20.0 v1.21.0 v1.22.0 v1.23.0 v1.24.0 v1.25.0 v1.26.0 v1.27.0 | |
do | |
helm template test ${{ steps.list-changed.outputs.chart_name }} --kube-version $i> $i.yaml | |
yamllint $i.yaml --config-file lintconf.yaml | |
done | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 10 | |
if: failure() | |
install-on-v1-26: | |
runs-on: ubuntu-latest | |
needs: lint-test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: clean disk | |
run: | | |
df -h | |
sudo swapoff -a | |
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc "$AGENT_TOOLSDIRECTORY" | |
sudo apt clean | |
docker rmi $(docker images -q) -f | |
df -h | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.12.3 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:v1.26.6 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Run chart-testing (install) | |
run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.lint-test.outputs.chart_name }} | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 10 | |
if: failure() | |
install-on-v1-27: | |
runs-on: ubuntu-latest | |
needs: lint-test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: clean disk | |
run: | | |
df -h | |
sudo swapoff -a | |
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc "$AGENT_TOOLSDIRECTORY" | |
sudo apt clean | |
docker rmi $(docker images -q) -f | |
df -h | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.12.3 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:v1.27.13 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Run chart-testing (install) | |
run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.lint-test.outputs.chart_name }} | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 10 | |
if: failure() | |
install-on-v1-28: | |
runs-on: ubuntu-latest | |
needs: lint-test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: clean disk | |
run: | | |
df -h | |
sudo swapoff -a | |
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc "$AGENT_TOOLSDIRECTORY" | |
sudo apt clean | |
docker rmi $(docker images -q) -f | |
df -h | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.12.3 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:v1.28.9 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Run chart-testing (install) | |
run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.lint-test.outputs.chart_name }} | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 10 | |
if: failure() | |
install-on-v1-29: | |
runs-on: ubuntu-latest | |
needs: lint-test | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: clean disk | |
run: | | |
df -h | |
sudo swapoff -a | |
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc "$AGENT_TOOLSDIRECTORY" | |
sudo apt clean | |
docker rmi $(docker images -q) -f | |
df -h | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Set up Helm | |
uses: azure/setup-helm@v3 | |
with: | |
version: v3.12.3 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.9 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Set up chart-testing | |
uses: helm/[email protected] | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Create kind cluster | |
uses: helm/[email protected] | |
with: | |
node_image: kindest/node:v1.29.4 | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Run chart-testing (install) | |
run: ct install --debug --config ct.yaml --print-config --charts ${{ needs.lint-test.outputs.chart_name }} | |
if: ${{ needs.lint-test.outputs.changed == 'true' }} | |
- name: Setup tmate session | |
uses: mxschmitt/action-tmate@v3 | |
timeout-minutes: 10 | |
if: failure() |