forked from cloudnative-pg/cnpg-i
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Taskfile.yml
84 lines (76 loc) · 3.23 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
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: 2b7d0f2bfe2c36ae415d34dcf6767a0cd831fc53
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: 2b7d0f2bfe2c36ae415d34dcf6767a0cd831fc53
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: b249f27c0d6a2183cd368ae767fc912a09a1a40f
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: 2b7d0f2bfe2c36ae415d34dcf6767a0cd831fc53
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
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: 2b7d0f2bfe2c36ae415d34dcf6767a0cd831fc53
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: 2b7d0f2bfe2c36ae415d34dcf6767a0cd831fc53
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:
- commitlint
- uncommitted
clean:
desc: Remove autogenerated artifacts
cmds:
- rm -f docs/docs.md
- rm -rf .task/
- rm -f pkg/*/*.pb.go