-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yaml
68 lines (59 loc) · 1.4 KB
/
Taskfile.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
version: "3"
includes:
gh:
taskfile: .taskfiles/gh
dir: .taskfiles/gh
k8s:
taskfile: .taskfiles/k8s
dir: .taskfiles/k8s
tf:
taskfile: .taskfiles/terraform
dir: .taskfiles/terraform
# pitower:
# taskfile: pitower
# dir: pitower
talos:
taskfile: pitower/talos
dir: pitower/talos
kubernetes:
taskfile: pitower/kubernetes
dir: pitower/kubernetes
env:
TERRAFORM_WORKING_DIR: "terraform"
ENVIRONMENT: "dev"
# dotenv:
# - .envrc
# - .config/.env.{{.ENVIRONMENT}}
# vars:
# SECRET_PATHS_REGEX:
# sh: yq e '.creation_rules[].path_regex' .sops.yaml | awk '{print "./"$0}' | tr '\n' '|'
# SECRET_FILES:
# sh: |
# {{ if eq OS "linux" }} find \
# {{ else if eq OS "darwin"}} gfind \
# {{ end }} -type f -regextype posix-egrep -regex "{{.SECRET_PATHS_REGEX}}"
tasks:
pre-commit:init:
desc: Initiate and install dependencies
cmds:
- pre-commit install
pre-commit:check:
desc: Check all pre-commit hooks
cmds:
- pre-commit run -a
secret:ls:
desc: List all secret files
silent: true
cmds:
- echo "{{.SECRET_FILES}}"
secret:encrypt:
desc: Encrypt all secret files
silent: true
cmds:
- echo "{{.SECRET_FILES}}" | xargs -I {} sops -e -i {}
gh:all:
desc: Run all GitHub tasks
cmds:
- task gh:repo
- task gh:update-environment-variables ENVIROMENT=dev