ci: run Argo to test our workflows #2194
This file contains 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: Validate Manifests | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
lint-yaml: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: pip install yamllint | |
- run: yamllint -c .yamllint.yaml --format github . | |
kustomize: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: azure/setup-kubectl@v3 | |
- uses: azure/[email protected] | |
- uses: bmuschko/setup-kubeconform@v1 | |
- name: validate kustomize with kubeconform | |
run: | | |
set -o errexit | |
set -o pipefail | |
items=$(find bootstrap -maxdepth 2 -name kustomization.yaml -exec dirname {} \;) | |
items+=($(find operators -maxdepth 2 -name kustomization.yaml -exec dirname {} \;)) | |
items+=($(find components -maxdepth 2 -name kustomization.yaml -exec dirname {} \;)) | |
items+=($(find apps -maxdepth 2 -name kustomization.yaml -exec dirname {} \;)) | |
for item in ${items}; do | |
echo "${item}" | |
kubectl kustomize --enable-helm "${item}" | \ | |
kubeconform -skip=Secret -strict -ignore-missing-schemas | |
done | |
workflows-description: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: thiagodnf/[email protected] | |
with: | |
jsonSchemaFile: argo-workflows/.workflow_with_description.schema.json | |
yamlFiles: | | |
argo-workflows/**/workflowtemplates/*.y*ml | |
argo-workflows/**/sensors/*.y*ml | |
argo-workflows/**/workflows/*.y*ml |