-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtaskfile.yaml
More file actions
59 lines (52 loc) · 1.67 KB
/
taskfile.yaml
File metadata and controls
59 lines (52 loc) · 1.67 KB
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
54
55
56
57
58
59
version: 3
tasks:
default:
desc: Build everything
cmds:
- task: machinecfg
- task: machinecfg-controller-netbox-updater
- task: machinecfg-controller-kubernetes-updater
machinecfg:
desc: Build the CLI binary
cmds:
- mkdir -p out
- go build -o out/machinecfg ./cli/machinecfg
test:
desc: Run unit and integration tests
preconditions:
- |
if [ -z "$NETBOX_TOKEN" ] || [ -z "$NETBOX_ENDPOINT" ]; then
echo "WARNING: NETBOX_TOKEN and/or NETBOX_ENDPOINT are not set — integration tests will be skipped"
fi
cmds:
- go test ./...
- go test -tags integration ./...
seed-netbox:
desc: Seed NetBox with the testing tenant and devices for integration tests
preconditions:
- test -n "$NETBOX_TOKEN"
- test -n "$NETBOX_ENDPOINT"
cmds:
- go run ./tooling/seed-netbox/
seed-authentik:
desc: Configure machinecfg service accounts and groups in Authentik, create NetBox tokens
preconditions:
- test -n "$AUTHENTIK_ENDPOINT"
- test -n "$AUTHENTIK_TOKEN"
- test -n "$NETBOX_ENDPOINT"
- test -n "$NETBOX_TOKEN"
cmds:
- go run ./tooling/seed-authentik/
machinecfg-controller-netbox-updater:
desc: Build the NetBox updater controller binary
cmds:
- mkdir -p out
- go build -o out/machinecfg-controller-netbox-updater ./controllers/controller-netbox-updater/
machinecfg-controller-kubernetes-updater:
desc: Build the Kubernetes updater controller binary
cmds:
- mkdir -p out
- go build -o out/machinecfg-controller-kubernetes-updater ./controllers/controller-kubernetes-updater/
clean-tmp:
desc: Remove temporary files
cmd: rm -rf tmp/*