forked from redpanda-data/connect
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTaskfile.yml
More file actions
91 lines (78 loc) · 2.25 KB
/
Taskfile.yml
File metadata and controls
91 lines (78 loc) · 2.25 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
version: '3'
dotenv:
- .env
- .env.local
- .versions
vars:
TARGET_DIR: target
TOOLS_BIN_DIR: bin
VERSION:
sh: git describe --tags 2>/dev/null | sed 's/^v//' || echo "0.0.0"
includes:
build: ./taskfiles/build.yml
docker: ./taskfiles/docker.yml
gh: ./taskfiles/gh.yml
test: ./taskfiles/test.yml
tools: ./taskfiles/tools.yml
tasks:
bump-benthos:
desc: Update Benthos to latest version
cmds:
- go get -u github.com/redpanda-data/benthos/v4@latest
- go mod tidy
deps:
desc: Tidy Go modules
cmds:
- go mod tidy
fmt:
desc: Format code and tidy modules
deps:
- tools:install-golangci-lint
- tools:install-yamlfmt
cmds:
- '{{.TOOLS_BIN_DIR}}/yamlfmt'
- '{{.TOOLS_BIN_DIR}}/golangci-lint fmt cmd/... internal/... public/...'
- go mod tidy
lint:
desc: Run linter on code
deps:
- tools:install-golangci-lint
cmds:
- echo "Running task lint. Consider using command 'fix-lint' to apply fixes."
- '{{.TOOLS_BIN_DIR}}/golangci-lint run cmd/... internal/... public/...'
fix-lint:
desc: Run linter on code and fix issues
deps:
- tools:install-golangci-lint
cmds:
- "{{.TOOLS_BIN_DIR}}/golangci-lint run --fix cmd/... internal/... public/..."
test:
desc: Run unit, template and ffi tests
deps:
- test:unit
- test:template
run:
desc: Run redpanda-connect with the specified config
vars:
CONF: '{{default "./config/dev.yaml" .CONF}}'
cmds:
- go run ./cmd/redpanda-connect --config {{.CONF}}
docs:
desc: Generate docs
deps:
- build:redpanda-connect
vars:
WEBSITE_DIR: ./docs/modules
cmds:
- go run -tags "{{.TAGS}}" ./cmd/tools/docs_gen
- go run -tags "{{.TAGS}}" ./cmd/tools/plugins_csv_fmt
- '{{.TARGET_DIR}}/redpanda-connect lint --deprecated "./config/examples/*.yaml" "{{.WEBSITE_DIR}}/**/*.md"'
- '{{.TARGET_DIR}}/redpanda-connect template lint "./config/template_examples/*.yaml"'
bundles:
desc: Update bundles
cmds:
- sh ./resources/scripts/update_bundles.sh
schema:
desc: Generate JSON schema for YAML config validation
cmds:
- go run ./cmd/redpanda-connect list --format jsonschema > config/.schema.json