-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
104 lines (87 loc) · 2.51 KB
/
Copy pathTaskfile.yml
File metadata and controls
104 lines (87 loc) · 2.51 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
version: "3"
#dotenv: [ '.env' ]
################################################################################################
#
# ref:
# - https://taskfile.dev/#/usage
# Project Template inspired from: github.com/better-sre
#
################################################################################################
#
# sub namespace: https://taskfile.dev/#/usage?id=including-other-taskfiles
#
includes:
tools:
taskfile: ./common/tools.Taskfile.yml
dir: .
python:
taskfile: ./common/python.Taskfile.yml
dir: .
git:
taskfile: ./common/git.Taskfile.yml
dir: .
pulumi:
taskfile: ./common/pulumi.Taskfile.yml
dir: .
docker:
aliases: [ 'dkr' ]
taskfile: ./docker/Taskfile.yml
#optional: true
docker:ci:
taskfile: docker/ci.Taskfile.yml
docker:compose:
aliases: [ 'dkc' ]
taskfile: docker/compose.Taskfile.yml
docker:swarm:
aliases: [ 'dks' ]
taskfile: docker/swarm.Taskfile.yml
os:
taskfile: ./os/{{OS}}.Taskfile.yml
dir: .
optional: true
################################################################################################
#
# global vars: https://taskfile.dev/#/usage?id=variables
#
vars:
VAR1: "some-var"
#
# global env: https://taskfile.dev/#/usage?id=environment-variables
#
env:
ENV1: testing-env
# env file:
#dotenv:
# - .env
################################################################################################
# task groups:
tasks:
#init:
# cmds:
# - cp .env.local .env
list:
desc: List all tasks with fuzzy-search (fzf)
silent: true
preconditions:
- sh: 'jq --version'
msg: 'Require: jq for verification'
- sh: 'fzf --version'
msg: 'Require: fzf for lazy-search'
cmd: tasks=$(task -aj | jq -r '.tasks[].name' | fzf --layout reverse --header='CTRL-c or ESC to quit' --preview="task -lj | jq -r '.tasks[] | select(.name == \"{}\")'" --preview-label='[Task details]'); test $tasks && task $tasks || echo >/dev/null
run-internal:
desc: "Execute some internal task: task run -- db:down"
cmd:
task: "{{.CLI_ARGS}}"
requires:
vars: [ CLI_ARGS ]
test-sample:
description: From recipe repo -- test "Taskfile.sample.yml"
cmds:
- task -t Taskfile.sample.yml --clear-cache
- task -t Taskfile.sample.yml --download -y
- task -t Taskfile.sample.yml --list-all
- task -t Taskfile.sample.yml list # echo
echo:
cmds:
- echo "hello world"
################################################################################