/
Taskfile.yaml
73 lines (64 loc) · 1.93 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
69
70
71
72
73
---
version: "3"
vars:
PROJECT_DIR:
sh: git rev-parse --show-toplevel
ANSIBLE_DIR: "{{.PROJECT_DIR}}/provision/ansible"
TERRAFORM_DIR: "{{.PROJECT_DIR}}/provision/terraform"
env:
ROOT_DIR: "{{.PROJECT_DIR}}"
KUBECONFIG: "{{.PROJECT_DIR}}/provision/kubeconfig"
includes:
ansible: .taskfiles/ansible.yaml
lint: .taskfiles/lint.yaml
precommit: .taskfiles/precommit.yaml
setup: .taskfiles/setup_{{OS}}.yaml
sops: .taskfiles/sops.yaml
terraform: .taskfiles/terraform.yaml
docker:
taskfile: .taskfiles/docker.yaml
dir: ./docker
tasks:
default:
silent: true
cmds:
- task -l
init:
desc: Install dependencies and setup environment
cmds:
- task: setup:init
- task: precommit:init
- task: precommit:update
- task: setup-age
- echo "Next, install python dependencies with 'task python'"
python:
desc: Install python dependencies
cmds:
- |
([ "{{.CLI_ARGS}}" == "force" ] || pip -V 2>/dev/null | grep -q .virtualenv) && \
pip install -r requirements.txt || \
echo "You may want to activate a python virtual environment before installing the python dependencies.
Pass 'force' as argument to continue anyway (e.g. task python -- force)."
silent: true
setup-age:
cmds:
- age-keygen -o age.agekey
- mkdir -p $HOME/.config/sops/age
- mv age.agekey $HOME/.config/sops/age/keys.txt
- "echo 'Source from .profile: \n\nexport SOPS_AGE_KEY_FILE=~/.config/sops/age/keys.txt'"
status:
- test -f $HOME/.config/sops/age/keys.txt
wip:
desc: Commit WIP to current branch and reconcile cluster
cmds:
- ./scripts/wip.sh
check-internal-404s:
desc: Check internal URLs for 404
cmds:
- npx zx ./scripts/check-internal-404s.mjs
env:
NODE_ENV: development
PUBLIC_DOMAIN: home.arpa
preconditions:
- sh: command -v node
msg: Node is not installed