Skip to content

Commit

Permalink
fix: solve error check k8s workflow palm (#104)
Browse files Browse the repository at this point in the history
* fix: solve error check k8s workflow palm

* fix: print versions and define specific kubeconform version

* fix: palm push branch

* fix: include extract kubernetes version
  • Loading branch information
marbonilla authored May 24, 2024
1 parent dd0f78b commit 06fbd69
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions .github/workflows/kubeconform-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ name: Kubeconform Validation

on:
pull_request:
push:
branches: palm

jobs:
load-environments:
Expand Down Expand Up @@ -41,7 +43,22 @@ jobs:
with:
kubectl: latest
kustomize: latest
kubeconform: latest
kubeconform: v0.6.6
- name: Print versions
run: |
echo "Kubectl version installed:"
kubectl version --client
echo "Kustomize version installed:"
kustomize version
echo "Kubeconform version installed:"
kubeconform -v
- name: Extract Kubernetes client version
id: extract_version
run: |
KUBECTL_VERSION=$(kubectl version --client --output=json | jq -r '.clientVersion.gitVersion' | sed 's/^v//')
echo "Extracted KUBECTL_VERSION=${KUBECTL_VERSION}"
echo "k8s_version=${KUBECTL_VERSION}" >> $GITHUB_OUTPUT
- name: Check k8s manifests
run: |
kustomize build $TUTOR_ROOT/env | kubeconform -strict -ignore-missing-schemas -kubernetes-version latest
K8S_VERSION=${{ steps.extract_version.outputs.k8s_version }}
kustomize build $TUTOR_ROOT/env | kubeconform -strict -ignore-missing-schemas -kubernetes-version ${K8S_VERSION}

0 comments on commit 06fbd69

Please sign in to comment.