mirror of
https://github.com/cloudnative-pg/plugin-barman-cloud.git
synced 2026-01-11 21:23:12 +01:00
ci: add controller-gen task
Add a task to run controller-gen, and put it as a dependency for the uncommitted and manifest task. Signed-off-by: Jonathan Gonzalez V. <jonathan.gonzalez@enterprisedb.com> Signed-off-by: Francesco Canovai <francesco.canovai@enterprisedb.com>
This commit is contained in:
parent
1ea9e93135
commit
c8cfc32c40
24
Taskfile.yml
24
Taskfile.yml
@ -46,6 +46,8 @@ tasks:
|
|||||||
|
|
||||||
uncommitted:
|
uncommitted:
|
||||||
desc: Check for uncommitted changes
|
desc: Check for uncommitted changes
|
||||||
|
deps:
|
||||||
|
- controller-gen
|
||||||
env:
|
env:
|
||||||
# renovate: datasource=git-refs depName=uncommitted lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
|
# renovate: datasource=git-refs depName=uncommitted lookupName=https://github.com/cloudnative-pg/daggerverse currentValue=main
|
||||||
DAGGER_UNCOMMITTED_SHA: c899668d635076ee593adaabfa7184fc753306ba
|
DAGGER_UNCOMMITTED_SHA: c899668d635076ee593adaabfa7184fc753306ba
|
||||||
@ -244,8 +246,30 @@ tasks:
|
|||||||
build --dir . --file containers/Dockerfile.sidecar --platform linux/amd64 --platform linux/arm64
|
build --dir . --file containers/Dockerfile.sidecar --platform linux/amd64 --platform linux/arm64
|
||||||
publish --ref {{.SIDECAR_IMAGE_NAME}} --tags {{.IMAGE_VERSION}}
|
publish --ref {{.SIDECAR_IMAGE_NAME}} --tags {{.IMAGE_VERSION}}
|
||||||
|
|
||||||
|
|
||||||
|
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: 1ad0ee66473e3a405d1078fcc55df00f2507d14a
|
||||||
|
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=./api/...
|
||||||
|
file --path api/v1/zz_generated.deepcopy.go export --path api/v1/zz_generated.deepcopy.go
|
||||||
|
- >
|
||||||
|
GITHUB_REF= dagger -s call -m github.com/cloudnative-pg/daggerverse/controller-gen@${DAGGER_CONTROLLER_GEN_SHA}
|
||||||
|
controller-gen --source . --args rbac:roleName=plugin-barman-cloud --args crd --args webhook --args paths=./api/...
|
||||||
|
--args output:crd:artifacts:config=config/crd/bases directory --path config/crd/bases export --path config/crd/bases
|
||||||
|
sources:
|
||||||
|
- ./api/**/*.go
|
||||||
|
generates:
|
||||||
|
- ./api/v1/zz_generated.deepcopy.go
|
||||||
|
|
||||||
manifest:
|
manifest:
|
||||||
desc: Update the image in the Kustomization
|
desc: Update the image in the Kustomization
|
||||||
|
deps:
|
||||||
|
- controller-gen
|
||||||
requires:
|
requires:
|
||||||
# We expect this to run in a GitHub workflow, so we put a few GitHub-specific vars here
|
# We expect this to run in a GitHub workflow, so we put a few GitHub-specific vars here
|
||||||
# to prevent running this task locally by accident.
|
# to prevent running this task locally by accident.
|
||||||
|
|||||||
@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
|
|||||||
kind: CustomResourceDefinition
|
kind: CustomResourceDefinition
|
||||||
metadata:
|
metadata:
|
||||||
annotations:
|
annotations:
|
||||||
controller-gen.kubebuilder.io/version: v0.16.1
|
controller-gen.kubebuilder.io/version: v0.16.2
|
||||||
name: objectstores.barmancloud.cnpg.io
|
name: objectstores.barmancloud.cnpg.io
|
||||||
spec:
|
spec:
|
||||||
group: barmancloud.cnpg.io
|
group: barmancloud.cnpg.io
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user