Skip to content

Commit f0ea4e6

Browse files
committed
chore: add controller-gen to tasks list and some order
The manifests wasn't a dependency for the uncommitted changes and we added the controller-gen missing task, now the uncommited has as dependency the manifest and manifest controller-gen Signed-off-by: Jonathan Gonzalez V. <[email protected]>
1 parent 615356d commit f0ea4e6

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

Taskfile.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,8 @@ tasks:
4646
4747
uncommitted:
4848
desc: Check for uncommitted changes
49+
deps:
50+
- controller-gen
4951
env:
5052
# renovate: datasource=git-refs depName=uncommitted lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
5153
DAGGER_UNCOMMITTED_SHA: d24d288a7219586f5ad2580f749ab4fe4226d51b
@@ -243,8 +245,30 @@ tasks:
243245
build --dir . --file containers/Dockerfile.sidecar --platform linux/amd64 --platform linux/arm64
244246
publish --ref {{.SIDECAR_IMAGE_NAME}} --tags {{.IMAGE_VERSION}}
245247
248+
249+
controller-gen:
250+
desc: Run controller-gen
251+
env:
252+
# renovate: datasource=git-refs depName=controller-gen lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
253+
DAGGER_CONTROLLER_GEN_SHA: 1ad0ee66473e3a405d1078fcc55df00f2507d14a
254+
cmds:
255+
- >
256+
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/controller-gen@${DAGGER_CONTROLLER_GEN_SHA}
257+
controller-gen --source . --args object:headerFile=hack/boilerplate.go.txt --args paths=./api/...
258+
file --path api/v1/zz_generated.deepcopy.go export --path api/v1/zz_generated.deepcopy.go
259+
- >
260+
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/controller-gen@${DAGGER_CONTROLLER_GEN_SHA}
261+
controller-gen --source . --args rbac:roleName=plugin-barman-cloud --args crd --args webhook --args paths=./api/...
262+
--args output:crd:artifacts:config=config/crd/bases directory --path config/crd/bases export --path config/crd/bases
263+
sources:
264+
- ./api/**/*.go
265+
generates:
266+
- ./api/v1/zz_generated.deepcopy.go
267+
246268
manifest:
247269
desc: Update the image in the Kustomization
270+
deps:
271+
- controller-gen
248272
requires:
249273
# We expect this to run in a GitHub workflow, so we put a few GitHub-specific vars here
250274
# to prevent running this task locally by accident.

config/crd/bases/barmancloud.cnpg.io_objectstores.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
33
kind: CustomResourceDefinition
44
metadata:
55
annotations:
6-
controller-gen.kubebuilder.io/version: v0.16.1
6+
controller-gen.kubebuilder.io/version: v0.16.2
77
name: objectstores.barmancloud.cnpg.io
88
spec:
99
group: barmancloud.cnpg.io
@@ -396,6 +396,9 @@ spec:
396396
status:
397397
description: ObjectStoreStatus defines the observed state of ObjectStore.
398398
type: object
399+
required:
400+
- metadata
401+
- spec
399402
type: object
400403
served: true
401404
storage: true

0 commit comments

Comments
 (0)