Skip to content

Commit aab2f77

Browse files
committed
adjust targets for run in prow & downgrade go
1 parent 55ae693 commit aab2f77

File tree

4 files changed

+21
-9
lines changed

4 files changed

+21
-9
lines changed

.prow.yaml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,10 @@ presubmits:
2121
preset-goproxy: "true"
2222
spec:
2323
containers:
24-
- image: ghcr.io/kcp-dev/infra/build:1.20.13-1
24+
- image: ghcr.io/kcp-dev/infra/build:1.21.8-1
2525
command:
26-
- cd examples/kcp
27-
- make kcp-server kcp-controller
28-
- make test
26+
- make
27+
- test-kcp-e2e
2928
resources:
3029
requests:
3130
memory: 6Gi

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,3 +133,8 @@ verify-generate: generate ## Verify generated files are up to date
133133
git diff; \
134134
echo "generated files are out of date, run make generate"; exit 1; \
135135
fi
136+
137+
138+
.PHONY: test-kcp-e2e
139+
test-kcp-e2e:
140+
cd examples/kcp && make kcp-server kcp-controller test

examples/kcp/Makefile

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
SHELL := /bin/bash
2+
3+
.PHONY: help
4+
help: ## Display this help.
5+
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z_0-9-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
6+
17

28
GO_INSTALL = ./hack/go-install.sh
39

@@ -60,11 +66,11 @@ kcp-server: $(KCP) $(ARTIFACT_DIR)/kcp ## Run the kcp server.
6066
@echo "kcp server is ready and running in the background. To stop run 'make test-cleanup'"
6167

6268
.PHONY: kcp-bootstrap
63-
kcp-bootstrap:
69+
kcp-bootstrap: ## Bootstrap the kcp server.
6470
@go run ./config/main.go
6571

6672
.PHONY: kcp-controller
67-
kcp-controller: build kcp-bootstrap
73+
kcp-controller: build kcp-bootstrap ## Run the kcp-controller.
6874
@echo "Starting kcp-controller in the background. To stop run 'make test-cleanup'"
6975
@if [[ ! -s $(ARTIFACT_DIR)/controller.log ]]; then ( ./bin/kcp-controller >$(ARTIFACT_DIR)/controller.log 2>&1 & ); fi
7076

@@ -78,12 +84,12 @@ test-cleanup: ## Clean up processes and directories from an end-to-end test run.
7884
$(ARTIFACT_DIR)/kcp: ## Create a directory for the kcp server data.
7985
mkdir -p $(ARTIFACT_DIR)/kcp
8086

81-
generate: build
87+
generate: build # Generate code
8288
./hack/update-codegen-crds.sh
8389

8490
run-local: build-controller kcp-bootstrap
8591
./bin/kcp-controller
8692

87-
.PHONY: test
93+
.PHONY: test # Run tests
8894
test:
8995
go test ./... --workspace=root --kubeconfig=$(CURDIR)/$(ARTIFACT_DIR)/kcp.kubeconfig

examples/kcp/go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
module github.com/kcp-dev/controller-runtime/examples/kcp
22

3-
go 1.22.2
3+
go 1.22.0
4+
5+
toolchain go1.22.2
46

57
// IMPORTANT: This is only an example replace directive. This is so examples can be run with the latest version of controller-runtime.
68
// In your own projects, you should not use replace directives like this. Instead, you should use the latest version of controller-runtime.

0 commit comments

Comments
 (0)