-
Notifications
You must be signed in to change notification settings - Fork 4
/
Taskfile.yml
101 lines (92 loc) · 3.77 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
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
version: '3'
tasks:
protolint:
desc: Run protolint
env:
# renovate: datasource=git-refs depName=protolint lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_PROTOLINT_SHA: 32dae448c22c7b3207753334307a8e4c9870991a
cmds:
- GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/protolint@${DAGGER_PROTOLINT_SHA} lint --source . --args "--config_path=.protolint.yaml" --args proto/ stdout
sources:
- proto/**/*.proto
protoc-gen-go-grpc:
desc: Compile proto files
deps:
- protolint
env:
# renovate: datasource=git-refs depName=protoc-gen-go-grpc lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_PROTOC_GEN_GO_GRPC_SHA: 32dae448c22c7b3207753334307a8e4c9870991a
cmds:
- >
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/protoc-gen-go-grpc@${DAGGER_PROTOC_GEN_GO_GRPC_SHA} run --source . --go-opt module=github.com/cloudnative-pg/cnpg-i
--go-grpcopt module=github.com/cloudnative-pg/cnpg-i --proto-path proto -o .
sources:
- proto/**/*.proto
lint:
desc: Run golangci-lint
deps:
- protoc-gen-go-grpc
env:
# renovate: datasource=git-refs depName=golangci-lint lookupName=https://github.com/sagikazarmark/daggerverse currentValue=main
DAGGER_GOLANGCI_LINT_SHA: 68e9daa611183f5334b4059bac6f4aad62da7a37
cmds:
- >
GITHUB_REF= dagger -s call -m github.com/sagikazarmark/daggerverse/golangci-lint@${DAGGER_GOLANGCI_LINT_SHA}
run --source . --config .golangci.yml stdout
sources:
- ./**/*.go
protoc-gen-doc:
desc: Generate documentation from proto files
env:
# renovate: datasource=git-refs depName=protoc-gen-doc lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_PROTOC_GEN_DOC_SHA: 32dae448c22c7b3207753334307a8e4c9870991a
cmds:
- GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/protoc-gen-doc@${DAGGER_PROTOC_GEN_DOC_SHA} generate --proto-dir proto -o docs
sources:
- proto/**/*.proto
spellcheck:
desc: Run spellcheck
deps:
- protoc-gen-doc
env:
# renovate: datasource=git-refs depName=spellcheck lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_SPELLCHECK_SHA: 32dae448c22c7b3207753334307a8e4c9870991a
cmds:
- >
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/spellcheck@${DAGGER_SPELLCHECK_SHA}
spellcheck --source . stdout
sources:
- ./**/*.md
- .spellcheck.yaml
- .wordlist.txt
commitlint:
desc: Check for conventional commits
env:
# renovate: datasource=git-refs depName=commitlint lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_COMMITLINT_SHA: 32dae448c22c7b3207753334307a8e4c9870991a
cmds:
- GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/commitlint@${DAGGER_COMMITLINT_SHA} lint --source . --args "--from=origin/main" stdout
uncommitted:
desc: Check for uncommitted changes
deps:
- lint
- protoc-gen-doc
env:
# renovate: datasource=git-refs depName=uncommitted lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_UNCOMMITTED_SHA: 32dae448c22c7b3207753334307a8e4c9870991a
cmds:
- GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/uncommitted@${DAGGER_UNCOMMITTED_SHA} check-uncommitted --source . stdout
sources:
- ./**
ci:
desc: Run the CI pipeline
deps:
- spellcheck
- commitlint
- uncommitted
clean:
desc: Remove autogenerated artifacts
cmds:
- rm -f docs/docs.md
- rm -rf .task/
- rm -f pkg/*/*.pb.go