Skip to content

Commit 70b0e22

Browse files
committed
Add kubebuilder to test's prerequisite
1 parent 24766cd commit 70b0e22

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

Makefile

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ POSTGRES_CRD_URL ?= https://raw.githubusercontent.com/zalando/postgres-operator/
2727
all: manager
2828

2929
# Run tests
30-
test: generate fmt vet manifests
30+
test: generate fmt vet manifests kubebuilder
3131
go test ./... -coverprofile cover.out -v
3232

3333
# todo: Modify Dockerfile to include the version magic
@@ -183,3 +183,12 @@ install-configmap-sidecars:
183183
# Todo: Add release version when the changes in main branch are released
184184
crd-cwnp-for-testing:
185185
curl https://raw.githubusercontent.com/metal-stack/firewall-controller/master/config/crd/bases/metal-stack.io_clusterwidenetworkpolicies.yaml -o external/test/crd-clusterwidenetworkpolicy.yaml
186+
187+
kubebuilder:
188+
{ \
189+
os=$$(go env GOOS) ;\
190+
arch=$$(go env GOARCH) ;\
191+
curl -L https://go.kubebuilder.io/dl/2.3.1/$${os}/$${arch} | tar -xz -C /tmp/ ;\
192+
sudo mv /tmp/kubebuilder_2.3.1_$${os}_$${arch} /usr/local/kubebuilder ;\
193+
export PATH=$PATH:/usr/local/kubebuilder/bin ;\
194+
}

0 commit comments

Comments
 (0)