tangled
alpha
login
or
join now
sans-self.org
/
infrastructure
0
fork
atom
this repo has no description
0
fork
atom
overview
issues
pulls
pipelines
Added Spindle pipeline
sans-self.org
1 month ago
3a228f9b
b3d7844d
+51
1 changed file
expand all
collapse all
unified
split
.tangled
workflows
validate.yml
+51
.tangled/workflows/validate.yml
reviewed
···
1
1
+
when:
2
2
+
- event: ["push"]
3
3
+
branch: ["main"]
4
4
+
- event: ["pull_request"]
5
5
+
branch: ["main"]
6
6
+
7
7
+
engine: "nixery"
8
8
+
9
9
+
dependencies:
10
10
+
nixpkgs:
11
11
+
- kustomize
12
12
+
- kubeconform
13
13
+
- opentofu
14
14
+
- yamllint
15
15
+
- shellcheck
16
16
+
17
17
+
steps:
18
18
+
- name: "Stub encrypted secrets"
19
19
+
command: |
20
20
+
for f in k8s/pds/admin-password.secret \
21
21
+
k8s/pds/jwt.secret \
22
22
+
k8s/pds/plc-rotation-key.secret \
23
23
+
k8s/pds/smtp-url.secret \
24
24
+
k8s/shared/s3-access-key.secret \
25
25
+
k8s/shared/s3-secret-key.secret; do
26
26
+
echo "stub" > "$f"
27
27
+
done
28
28
+
29
29
+
mkdir -p keypair
30
30
+
echo "stub" > keypair/id_ed25519_homelab
31
31
+
echo "stub" > keypair/id_ed25519_homelab.pub
32
32
+
33
33
+
- name: "Lint YAML"
34
34
+
command: |
35
35
+
yamllint -d '{extends: relaxed, rules: {line-length: disable}}' \
36
36
+
k8s/**/*.yaml
37
37
+
38
38
+
- name: "Lint shell scripts"
39
39
+
command: shellcheck k8s/shared/backup.sh
40
40
+
41
41
+
- name: "Validate kustomize manifests"
42
42
+
command: |
43
43
+
kustomize build k8s/ | kubeconform \
44
44
+
-strict \
45
45
+
-ignore-missing-schemas \
46
46
+
-summary
47
47
+
48
48
+
- name: "Validate OpenTofu"
49
49
+
command: |
50
50
+
tofu init -backend=false
51
51
+
tofu validate