generated from cloudnative-pg/cnpg-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Taskfile.yml
90 lines (82 loc) · 3.11 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
version: '3'
tasks:
controller-gen:
desc: Run controller-gen
env:
# renovate: datasource=git-refs depName=controller-gen lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
DAGGER_CONTROLLER_GEN_SHA: 32dae448c22c7b3207753334307a8e4c9870991a
cmds:
- >
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/controller-gen@${DAGGER_CONTROLLER_GEN_SHA}
controller-gen --source . --args object:headerFile=hack/boilerplate.go.txt --args paths=./pkg/api/...
file --path pkg/api/zz_generated.deepcopy.go export --path pkg/api/zz_generated.deepcopy.go
sources:
- ./pkg/api/**/*.go
generates:
- ./pkg/api/zz_generated.deepcopy.go
spellcheck:
desc: Run spellcheck
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:
- ./**
lint:
desc: Run golangci-lint
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
- .golangci.yml
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
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
deps:
- controller-gen
sources:
- ./**
go-test:
desc: Run go test
deps:
- controller-gen
env:
# renovate: datasource=docker depName=golang versioning=semver
GOLANG_IMAGE_VERSION: 1.23.2
cmds:
- >
GITHUB_REF= dagger -s call -m dagger/gotest --version ${GOLANG_IMAGE_VERSION} exec
--src . --args go --args test --args './...'
ci:
desc: Run the CI pipeline
deps:
- commitlint
- uncommitted
- spellcheck
- lint
- go-test
clean:
desc: Remove autogenerated artifacts
cmds:
- rm -rf .task/