feat!: ulmo support #324
This file contains hidden or 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
| name: Kubeconform Validation | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| env: | |
| UV_VERSION: 0.9.13 | |
| jobs: | |
| load-environments: | |
| name: Load environments | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - id: set-matrix | |
| run: echo "matrix=$(ls .github/environments/ | jq -R -s -c 'split("\n")[:-1]')" >> $GITHUB_OUTPUT | |
| validation: | |
| needs: load-environments | |
| strategy: | |
| matrix: | |
| environment: ${{fromJson(needs.load-environments.outputs.matrix)}} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: setup uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.10" | |
| enable-cache: true | |
| version: ${{ env.UV_VERSION }} | |
| - name: Install Kubernetes tools | |
| uses: alexellis/arkade-get@master | |
| with: | |
| kubectl: latest | |
| kubeconform: v0.7.0 | |
| - name: Setup Tutor environment | |
| run: | | |
| echo "TUTOR_ROOT=$GITHUB_WORKSPACE/.github/environments/${{ matrix.environment }}" >> $GITHUB_ENV | |
| echo "TUTOR_PLUGINS_ROOT=$TUTOR_ROOT/plugins" >> $GITHUB_ENV | |
| - name: Tutor config save | |
| run: | | |
| uv run \ | |
| --group test \ | |
| --isolated \ | |
| tutor config save | |
| - name: Print versions | |
| run: | | |
| echo "Kubectl version installed:" | |
| kubectl version --client | |
| 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: | | |
| K8S_VERSION=${{ steps.extract_version.outputs.k8s_version }} | |
| kubectl kustomize $TUTOR_ROOT/env | kubeconform -strict -ignore-missing-schemas -kubernetes-version ${K8S_VERSION} |