-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yaml
More file actions
111 lines (94 loc) · 2.66 KB
/
Taskfile.yaml
File metadata and controls
111 lines (94 loc) · 2.66 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: "3"
tasks:
default:
silent: true
desc: "List all tasks"
cmds:
- "{{.TASK_EXE}} --list-all"
check:
desc: "Check the code"
cmds:
- nix flake check
build:
desc: "Build the code"
cmds:
- >-
nix-fast-build --attic-cache default --skip-cached --no-download
--no-nom -j 4 --eval-workers 4 --flake .#checks.x86_64-linux
fmt:
desc: "Format the code"
cmds:
- nix fmt -- --no-cache
deploy-local:
desc: "Deploy to the current node (identified by hostname)"
cmds:
- nixos-rebuild switch --flake ".#$(hostname)" --use-remote-sudo
deploy:
desc: "Deploy to the a node (identified by `NODE` variable)"
cmds:
- deploy --skip-checks --auto-rollback false ".#{{.NODE}}" --debug-logs {{.CLI_ARGS}}
requires:
vars: [NODE]
diff:
desc: "Diff the current system with the new configuration"
cmds:
- scripts/diff.sh {{.CLI_ARGS}}
infect:
desc: "Infect the node with nixos-anywhere"
cmds:
- scripts/infect.sh {{.CLI_ARGS}}
keyscan:
desc: "Scan the SSH keys of the node"
cmds:
- uv run scripts/keyscan.py --node={{.NODE}} {{.CLI_ARGS}} --output=lib/data/keyscan.{{.NODE}}.json
- yq -P -o yaml lib/data/keyscan.{{.NODE}}.json
requires:
vars: [NODE]
ssh:
desc: "SSH into the node"
cmds:
- uv run scripts/ssh.py --node={{.NODE}} {{.CLI_ARGS}}
requires:
vars: [NODE]
docs:serve:
desc: "Serve the documentation locally"
cmds:
- >-
nix shell --impure --expr
'with import (builtins.getFlake "nixpkgs") {};
pkgs.python3.withPackages (ps: with ps; [ mkdocs mkdocs-material ])'
-c mkdocs serve
tf:apply:
desc: "Apply the Terraform configuration"
dir: "terraform/{{.MODULE}}"
cmds:
- terragrunt apply
requires:
vars: [MODULE]
secrets:edit:
desc: "Edit the secrets in the sources"
cmds:
- sops edit secrets/sources/{{.SOURCE}}.yaml
requires:
vars: [SOURCE]
secrets:decrypt:
desc: "Decrypt the secrets in the sources"
cmds:
- sops decrypt secrets/sources/{{.SOURCE}}.yaml
requires:
vars: [SOURCE]
secrets:sync:
desc: "Sync the secrets from sources to nodes"
cmds:
- uv run scripts/secrets.py sync --node={{.NODE}} {{.CLI_ARGS}}
requires:
vars: [NODE]
aws:login:
desc: "Login to the AWS account"
cmds:
- aws sso login
image:woodpeckerci-plugin-git:
desc: "Build and push tillycode/woodpeckerci-plugin-git"
cmds:
- scripts/build-push-image.sh woodpeckerci-plugin-git-image