From 9372a6b2cfc6095b41c6b5b32052299f13ef3e10 Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Thu, 20 Jun 2024 10:48:01 +0200 Subject: [PATCH] wip Signed-off-by: Federico Di Pierro --- .github/workflows/ci.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index db49402805..05b58e0c56 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,9 +22,18 @@ jobs: wget https://github.com/yannh/kubeconform/releases/download/v0.6.6/kubeconform-linux-amd64.tar.gz tar -xvf kubeconform-linux-amd64.tar.gz chmod +x kubeconform + + # Since we use eg: 1.21, but kubeconform wants full semver (ie: 1.21.0), + # load the version and append a ".0" + - name: Load k8s version + id: version + run: | + VERSION=$(cat config/clusters/eks_variables.tf | grep "eks_cluster_version" -A 1 | tail -n1 | awk '{print $3}') + [[ "$VERSION" =~ ^[0-9]+\.[0-9]+ ]] && FULL_VERSION="${BASH_REMATCH[0]}.0" + echo "k8s_version=$FULL_VERSION" >> $GITHUB_OUTPUT - name: yaml config validation 🔍 - run: ./kubeconform --ignore-missing-schemas config/prow + run: ./kubeconform -ignore-filename-pattern ".json" -kubernetes-version ${{ steps.version.outputs.k8s_version }} -ignore-missing-schemas /home/federico/Work/test-infra/config/prow/ scan-terraform: runs-on: ubuntu-latest