Publish documentation #101
Workflow file for this run
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
--- | |
# This workflow is used for Continuous Integration for the root-sync/ directory. | |
name: CI for root-sync/ | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- "root-sync/**" | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./root-sync | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install kubeconform | |
run: | | |
set -exo pipefail | |
# Determine the artifact pattern: kubeconform-<os>-<arch>.tar.gz | |
case "$(uname -m)" in | |
x86_64) ;& # Fallthrough | |
amd64) arch=amd64 ;; | |
arm64) arch=arm64 ;; | |
*) | |
echo "Unsupported architecture: $(uname -m)" 1>&2 | |
exit 1 | |
;; | |
esac | |
case "$(uname -s)" in | |
Darwin) os=darwin ;; | |
Linux) os=linux ;; | |
*) | |
echo "Unsupported operating system: $(uname -m)" 1>&2 | |
exit 1 | |
;; | |
esac | |
artifact=kubeconform-${os}-${arch}.tar.gz | |
gh release --repo yannh/kubeconform download "$KUBECONFORM_VERSION" --pattern "$artifact" | |
tar -xzf "$artifact" | |
sudo cp kubeconform /usr/local/bin | |
rm kubeconform "$artifact" | |
# Check the version | |
which kubeconform | |
kubeconform -v | |
env: | |
GH_TOKEN: ${{ github.token }} | |
KUBECONFORM_VERSION: v0.6.4 | |
- name: Check manifests in base/ | |
working-directory: ./root-sync/base | |
run: | | |
set -euxo pipefail | |
kustomize build . \ | |
| kubeconform \ | |
-verbose -strict \ | |
-ignore-missing-schemas \ | |
-schema-location default \ | |
-schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' | |
- name: Check manifests in overlays/test/ | |
working-directory: ./root-sync/overlays/test | |
run: | | |
set -euxo pipefail | |
kustomize build . \ | |
| kubeconform \ | |
-verbose -strict \ | |
-ignore-missing-schemas \ | |
-schema-location default \ | |
-schema-location 'https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json' | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v2' | |
with: | |
version: '>= 472.0.0' | |
- name: Install nomos | |
run: gcloud components install nomos | |
- name: Check Config Connector resources | |
run: nomos vet --clusters "" --no-api-server-check --source-format unstructured | |
# Refer to the docs https://cloud.google.com/anthos-config-management/docs/how-to/nomos-command#vet |