-
Notifications
You must be signed in to change notification settings - Fork 6
53 lines (46 loc) · 1.9 KB
/
ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: CI
on:
pull_request:
push:
branches: ["main"]
jobs:
pre-commit:
name: Pre-commit checks 🛃
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Write required vault files
run: |
mkdir -p terraform/vault/cluster/.tls
echo 'keep' > terraform/vault/cluster/.tls/vault.pem
echo 'keep' > terraform/vault/cluster/.tls/vault-key.pem
echo 'keep' > terraform/vault/cluster/.tls/ca-chain.pem
- name: Validate Terraform Opentofu configuration
uses: dagger/dagger-for-github@v7
with:
version: "latest"
verb: call
module: github.com/Smana/daggerverse/pre-commit-tf@pre-commit-tf/v0.1.1
args: run --dir "." --tf-binary="tofu"
kubernetes-validation:
name: Kubernetes validation ☸
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Validate Flux clusters manifests
uses: dagger/dagger-for-github@v7
with:
version: "latest"
verb: call
module: github.com/Smana/daggerverse/kubeconform@kubeconform/v0.1.0
args: validate --manifests "./clusters" --catalog
- name: Validate Kubernetes manifests (Kustomize directories)
uses: dagger/dagger-for-github@v7
with:
version: "latest"
verb: call
module: github.com/Smana/daggerverse/kubeconform@kubeconform/v0.1.0
args: validate --manifests "." --kustomize --flux --env="cluster_name:foobar,region:eu-west-3,domain_name:example.com" --catalog --crds https://github.com/kubernetes-sigs/gateway-api/tree/main/config/crd/experimental,https://raw.githubusercontent.com/grafana/grafana-operator/master/config/crd/bases/grafana.integreatly.org_grafanadashboards.yaml # These are CRDs that are not supported yet by the datree catalog