From 9821d33075f19f3c9e214881cac6074518c3b864 Mon Sep 17 00:00:00 2001 From: bg-furiosa <143981183+bg-furiosa@users.noreply.github.com> Date: Wed, 2 Oct 2024 19:34:58 -0500 Subject: [PATCH] Enable ci (#9) * trigger chart release only if actual changes exist under charts dir Signed-off-by: bg-furiosa * add github action to test helm chart with kind cluster and ct Signed-off-by: bg-furiosa * for test Signed-off-by: bg-furiosa * add nfd repo for testing furiosa feature discovery Signed-off-by: bg-furiosa * disable fail fast Signed-off-by: bg-furiosa * fix ct lint Signed-off-by: bg-furiosa * set namespace to kube-system Signed-off-by: bg-furiosa * fix wrong option key Signed-off-by: bg-furiosa * fix cluster name Signed-off-by: bg-furiosa * test Signed-off-by: bg-furiosa * re order steps Signed-off-by: bg-furiosa * wait until nodes become ready before installing helm chart Signed-off-by: bg-furiosa * pass helm time out option to extend timeout deadline Signed-off-by: bg-furiosa * remove kind versions before v1.24 Signed-off-by: bg-furiosa * add test for v1.29.8, v1.30.4, v1.31.0 Signed-off-by: bg-furiosa * enable check-version-increment Signed-off-by: bg-furiosa * set specific path to run github action Signed-off-by: bg-furiosa --------- Signed-off-by: bg-furiosa --- .github/workflows/examine_pr_changes.yml | 44 +++++++++++++++++++ .../workflows/kind_config/kind_v1.24.15.yaml | 7 +++ .../workflows/kind_config/kind_v1.25.11.yaml | 7 +++ .../workflows/kind_config/kind_v1.26.6.yaml | 7 +++ .../workflows/kind_config/kind_v1.27.3.yaml | 7 +++ .../workflows/kind_config/kind_v1.28.0.yaml | 7 +++ .../workflows/kind_config/kind_v1.29.8.yaml | 7 +++ .../workflows/kind_config/kind_v1.30.4.yaml | 7 +++ .../workflows/kind_config/kind_v1.31.0.yaml | 7 +++ .github/workflows/release.yml | 2 + 10 files changed, 102 insertions(+) create mode 100644 .github/workflows/examine_pr_changes.yml create mode 100644 .github/workflows/kind_config/kind_v1.24.15.yaml create mode 100644 .github/workflows/kind_config/kind_v1.25.11.yaml create mode 100644 .github/workflows/kind_config/kind_v1.26.6.yaml create mode 100644 .github/workflows/kind_config/kind_v1.27.3.yaml create mode 100644 .github/workflows/kind_config/kind_v1.28.0.yaml create mode 100644 .github/workflows/kind_config/kind_v1.29.8.yaml create mode 100644 .github/workflows/kind_config/kind_v1.30.4.yaml create mode 100644 .github/workflows/kind_config/kind_v1.31.0.yaml diff --git a/.github/workflows/examine_pr_changes.yml b/.github/workflows/examine_pr_changes.yml new file mode 100644 index 0000000..515b535 --- /dev/null +++ b/.github/workflows/examine_pr_changes.yml @@ -0,0 +1,44 @@ +name: Helm + +on: + push: + paths: ["charts/**"] + branches: [ "main" ] + pull_request: + paths: ["charts/**"] + branches: [ "main" ] + +jobs: + helm: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + k8s-version: ['v1.24.15', 'v1.25.11', 'v1.26.6', 'v1.27.3', 'v1.28.0', 'v1.29.8', 'v1.30.4', 'v1.31.0'] + steps: + - name: checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: create kind cluster + uses: helm/kind-action@v1.8.0 + with: + cluster_name: helm-charts-test-${{ matrix.k8s-version }} + config: .github/workflows/kind_config/kind_${{ matrix.k8s-version }}.yaml + kubectl_version: ${{ matrix.k8s-version }} + - name: Set up Helm + uses: azure/setup-helm@v3 + with: + version: v3.12.1 + - name: setup helm env + uses: helm/chart-testing-action@v2.6.0 + - name: Add dependency chart repos + run: | + helm repo add nfd https://kubernetes-sigs.github.io/node-feature-discovery/charts + - name: helm lint + run: ct lint --chart-dirs=charts --target-branch=${{ github.event.repository.default_branch }} --validate-maintainers=false --check-version-increment=true --charts charts/furiosa-device-plugin,charts/furiosa-feature-discovery,charts/furiosa-metrics-exporter + - name: Wait for nodes to be ready + run: | + kubectl wait --for=condition=Ready nodes --all --timeout=300s + - name: try install + run: ct install --chart-dirs charts --charts charts/furiosa-device-plugin,charts/furiosa-feature-discovery,charts/furiosa-metrics-exporter --namespace kube-system --helm-extra-args '--timeout 500s' diff --git a/.github/workflows/kind_config/kind_v1.24.15.yaml b/.github/workflows/kind_config/kind_v1.24.15.yaml new file mode 100644 index 0000000..0e0aec7 --- /dev/null +++ b/.github/workflows/kind_config/kind_v1.24.15.yaml @@ -0,0 +1,7 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.24.15@sha256:24473777a1eef985dc405c23ab9f4daddb1352ca23db60b75de9e7c408096491 + - role: worker + image: kindest/node:v1.24.15@sha256:24473777a1eef985dc405c23ab9f4daddb1352ca23db60b75de9e7c408096491 diff --git a/.github/workflows/kind_config/kind_v1.25.11.yaml b/.github/workflows/kind_config/kind_v1.25.11.yaml new file mode 100644 index 0000000..de4cc42 --- /dev/null +++ b/.github/workflows/kind_config/kind_v1.25.11.yaml @@ -0,0 +1,7 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.25.11@sha256:ca7371d5d1f680778e40e9bcbbea06c3c61ac6f0e1a29cba5c58ff2dae1ba7f5 + - role: worker + image: kindest/node:v1.25.11@sha256:ca7371d5d1f680778e40e9bcbbea06c3c61ac6f0e1a29cba5c58ff2dae1ba7f5 diff --git a/.github/workflows/kind_config/kind_v1.26.6.yaml b/.github/workflows/kind_config/kind_v1.26.6.yaml new file mode 100644 index 0000000..28fce45 --- /dev/null +++ b/.github/workflows/kind_config/kind_v1.26.6.yaml @@ -0,0 +1,7 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.26.6@sha256:5e5d789e90c1512c8c480844e0985bc3b4da4ba66179cc5b540fe5b785ca97b5 + - role: worker + image: kindest/node:v1.26.6@sha256:5e5d789e90c1512c8c480844e0985bc3b4da4ba66179cc5b540fe5b785ca97b5 diff --git a/.github/workflows/kind_config/kind_v1.27.3.yaml b/.github/workflows/kind_config/kind_v1.27.3.yaml new file mode 100644 index 0000000..24762de --- /dev/null +++ b/.github/workflows/kind_config/kind_v1.27.3.yaml @@ -0,0 +1,7 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.27.3@sha256:9dd3392d79af1b084671b05bcf65b21de476256ad1dcc853d9f3b10b4ac52dde + - role: worker + image: kindest/node:v1.27.3@sha256:9dd3392d79af1b084671b05bcf65b21de476256ad1dcc853d9f3b10b4ac52dde diff --git a/.github/workflows/kind_config/kind_v1.28.0.yaml b/.github/workflows/kind_config/kind_v1.28.0.yaml new file mode 100644 index 0000000..474637b --- /dev/null +++ b/.github/workflows/kind_config/kind_v1.28.0.yaml @@ -0,0 +1,7 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.28.0@sha256:9f3ff58f19dcf1a0611d11e8ac989fdb30a28f40f236f59f0bea31fb956ccf5c + - role: worker + image: kindest/node:v1.28.0@sha256:9f3ff58f19dcf1a0611d11e8ac989fdb30a28f40f236f59f0bea31fb956ccf5c diff --git a/.github/workflows/kind_config/kind_v1.29.8.yaml b/.github/workflows/kind_config/kind_v1.29.8.yaml new file mode 100644 index 0000000..4a6b0e9 --- /dev/null +++ b/.github/workflows/kind_config/kind_v1.29.8.yaml @@ -0,0 +1,7 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.29.8@sha256:d46b7aa29567e93b27f7531d258c372e829d7224b25e3fc6ffdefed12476d3aa + - role: worker + image: kindest/node:v1.29.8@sha256:d46b7aa29567e93b27f7531d258c372e829d7224b25e3fc6ffdefed12476d3aa diff --git a/.github/workflows/kind_config/kind_v1.30.4.yaml b/.github/workflows/kind_config/kind_v1.30.4.yaml new file mode 100644 index 0000000..9c36258 --- /dev/null +++ b/.github/workflows/kind_config/kind_v1.30.4.yaml @@ -0,0 +1,7 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.30.4@sha256:976ea815844d5fa93be213437e3ff5754cd599b040946b5cca43ca45c2047114 + - role: worker + image: kindest/node:v1.30.4@sha256:976ea815844d5fa93be213437e3ff5754cd599b040946b5cca43ca45c2047114 diff --git a/.github/workflows/kind_config/kind_v1.31.0.yaml b/.github/workflows/kind_config/kind_v1.31.0.yaml new file mode 100644 index 0000000..7712826 --- /dev/null +++ b/.github/workflows/kind_config/kind_v1.31.0.yaml @@ -0,0 +1,7 @@ +kind: Cluster +apiVersion: kind.x-k8s.io/v1alpha4 +nodes: + - role: control-plane + image: kindest/node:v1.31.0@sha256:53df588e04085fd41ae12de0c3fe4c72f7013bba32a20e7325357a1ac94ba865 + - role: worker + image: kindest/node:v1.31.0@sha256:53df588e04085fd41ae12de0c3fe4c72f7013bba32a20e7325357a1ac94ba865 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 32cc649..fb2f536 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,6 +4,8 @@ on: push: branches: - main + paths: + - 'charts/**' jobs: release: