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: fa2e604b785c0ff9252a807097fc1215e10df486
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: fa2e604b785c0ff9252a807097fc1215e10df486
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: 32b01ce09db8bfc7ef06dec92ea20d42855cbf81
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: fa2e604b785c0ff9252a807097fc1215e10df486
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: fa2e604b785c0ff9252a807097fc1215e10df486
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.4
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/