Skip to content

Commit

Permalink
[graphite] Update chart version (#6)
Browse files Browse the repository at this point in the history
* Update chart version

* Use short tags

* Update action versions

* Update Avaiable kind versions

* Replace kubeval with kubeconform

* Replace kubeval with kubeconform

* remove token from helm

* remove name

* check old versions

* Add naming for ci step

* check old versions

* check old versions
  • Loading branch information
iaacautomation authored Mar 15, 2024
1 parent 03b6bd9 commit ce01d60
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 45 deletions.
15 changes: 15 additions & 0 deletions .github/kubeconform.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash -x
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="v0.6.4"
SCHEMA_LOCATION="https://raw.githubusercontent.com/yannh/kubernetes-json-schema/master/"

# install kubeval
curl --silent --show-error --fail --location --output /tmp/kubeconform.tar.gz https://github.com/yannh/kubeconform/releases/download/"${KUBEVAL_VERSION}"/kubeconform-linux-amd64.tar.gz
tar -xf /tmp/kubeconform.tar.gz kubeconform

# validate charts
for CHART_DIR in ${CHART_DIRS}; do
helm template "${CHART_DIR}" | ./kubeconform --strict --ignore-missing-schemas --kubernetes-version "${KUBERNETES_VERSION#v}" --schema-location "${SCHEMA_LOCATION}"
done
15 changes: 0 additions & 15 deletions .github/kubeval.sh

This file was deleted.

52 changes: 29 additions & 23 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,70 +5,76 @@ on:

env:
helm-version: "v3.12.2"
kubeval-version: "v0.16.1"
kubeconform-version: "v0.16.1"

jobs:
kubeval-chart:
runs-on: ubuntu-20.04
kubeconform-chart:
name: Validate chart on ${{ matrix.k8s }}
runs-on: ubuntu-latest
strategy:
matrix:
k8s:
- v1.21.14
- v1.22.17
- v1.23.17
- v1.24.15
- v1.25.11
- v1.26.6
- v1.27.3
- v1.24.17
- v1.25.16
- v1.26.14
- v1.27.11
- v1.28.7
- v1.29.2
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
uses: azure/setup-helm@v4

- name: Run kubeval
- name: Run kubeconform
env:
KUBERNETES_VERSION: ${{ matrix.k8s }}
run: .github/kubeval.sh
run: .github/kubeconform.sh

test-chart:
name: test-chart
# name: Test Helm Chart ${{ matrix.k8s }}
runs-on: ubuntu-latest
needs:
- kubeval-chart
- kubeconform-chart
strategy:
matrix:
k8s:
- v1.21.14
- v1.22.17
- v1.23.17
- v1.24.15
- v1.24.17
- v1.24.15
- v1.25.16
- v1.25.11
- v1.26.14
- v1.26.6
- v1.27.11
- v1.27.3
- v1.28.7
- v1.29.2
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Helm
uses: azure/setup-helm@v3
with:
version: v3.12.1
uses: azure/setup-helm@v4

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: '3.9'
python-version: '3.12'
check-latest: true

- name: Set up chart-testing
uses: helm/chart-testing-action@v2.4.0
uses: helm/chart-testing-action@v2

- name: Run chart-testing (list-changed)
id: list-changed
Expand All @@ -80,7 +86,7 @@ jobs:
- name: Create kind ${{ matrix.k8s }} cluster
if: steps.list-changed.outputs.changed == 'true'
uses: helm/kind-action@v1.8.0
uses: helm/kind-action@v1
with:
node_image: kindest/node:${{ matrix.k8s }}
kubectl_version: ${{ matrix.k8s }}
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand All @@ -24,11 +24,9 @@ jobs:
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
uses: azure/setup-helm@v4

- name: Run chart-releaser
uses: helm/chart-releaser-action@v1.5.0
uses: helm/chart-releaser-action@v1
env:
CR_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
4 changes: 2 additions & 2 deletions charts/graphite/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v1
version: 1.1.1
apiVersion: v2
version: 2.0.0
appVersion: "1.1.10-5"
description: Graphite metrics server
name: graphite
Expand Down

0 comments on commit ce01d60

Please sign in to comment.