-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
63 lines (56 loc) · 1.58 KB
/
Taskfile.yml
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
---
# https://taskfile.dev
version: "3"
# vars:
tasks:
default:
deps: [setup]
cmds:
- task: trunk:format
# - task: tf:sec
- task: tf:docs
setup:
silent: true
desc: test that prerequisites are setup
status:
- test $(command -v asdf) || brew install asdf
# - test "$(uname -s)" = "Darwin" # && echo "Darwin ok"
- test $(command -v python3) || (Failed to find Python v3 && exit 1)
- test $(command -v trunk)
# - test $(command -v terraform) || brew install terraform
# - test $(command -v checkov) || brew install checkov
# - test $(command -v tfsec) || brew install tfsec
cmds:
# https://docs.trunk.io/getting-started#trunk-launcher
# TODO Add trunk support in asdf-vm
- echo "Installing Trunk Launcher ..."
- echo "Install Trunk Launcher"
- echo "curl https://get.trunk.io -fsSL | bash"
- curl https://get.trunk.io -fsSL | bash
- echo "Please confirm the required commands and tools are available and try again." && exit 1
docker:
silent: true
deps: [setup]
desc: test that docker is running
status:
- pgrep -f Docker.app
cmds:
- open -a 'Docker'
- echo "Waiting for Docker to start up ..."
- sleep 20
trunk:init:
# silent: true
desc: test that a trunk config file exists
status:
- test -f .trunk/trunk.yaml
cmds:
- trunk init
generates:
- ./.trunk/trunk.yaml
trunk:format:
silent: true
desc: fix easy lint and style issues
deps:
- trunk:init
cmds:
- trunk fmt -a